2Pe 2:9 KJV The Lord knoweth how to deliver the godly out of temptations…
God is faithful enough to establish us and to keep us from evil. (2 Thess 3:3)
Temptations are defined as a desire to sin, driven by our fleshly lusts. They are different from trials, which are God-ordained.
Christ told the disciples, to pray that they do not fall into temptation. (Matt 26:41)
One way to get delivered from temptation is by prayer.