While we face tempations from the outside, sin comes from the inside. Yes, the Devil may whisper into our ears and try to get us to do things we know we should not. In the end though, we have free will. Sin boils up from the inside and we cannot blame anyone else when we falter.
"Nothing that enters one from outside can defile that person;but the things
that come out from within are what defile. From within people, from their
hearts,come evil thoughts, unchastity, theft, murder, adultery, greed, malice,
deceit, licentiousness, envy, blasphemy, arrogance, folly. All these evils come
from within and they defile.”
The good news is that we have access to God's grace that will quash those urges and vices we only need to turn to Him. If we don't take advantage of the graces that God tries to give us, especially those available in the sacraments, then we have no one to blame but ourselves.