Being tempted is one thing and yielding to temptation is another thing. Adam and Eve were tempted in the Garden of Eden and they yielded to that temptation, and they suffered.
Satan tempts us in the same way, through “the lust of the flesh, the lust of the eyes, and the pride of life.” 1 John 2: 16.
It is not a sin to be tempted, at times we all are tempted. God always provides a way to escape.
“There hath no temptation taken you but such as is common to man: but God is faithful, who will not suffer you to be tempted above that ye are able; but will with the temptation also make a way to escape, that ye may be able to bear it.” I Corinthians 10:13.
When Jesus was tempted he replied to Satan with the Word of God. So when Satan comes to us we can make him flee by responding to him with the Word of God.