The bible says the holy spirit led him out to the temptations.The confrontation was meant to happen.
Driven by the Spirit into the desert, Jesus remains there for forty days without eating; he lives among wild beasts, and angels minister to him. At the end of this time Satan tempts him three times, seeking to compromise his filial attitude toward God.
First, Satan tempted Jesus to turn stones into bread to relieve his hunger, emphasizing the physical aspect of his humanity. Jesus responded by asserting the importance of spiritual nourishment over physical desires.
In the second temptation, Satan urged Jesus to jump from the pinnacle of the temple, testing God's protection by relying on miraculous intervention. Jesus rejected this, emphasizing the need to trust in God without putting Him to the test.
Finally, Satan offered Jesus all the kingdoms of the world in exchange for worship. Jesus rebuffed the offer, emphasizing the exclusive worship of God and rejecting the pursuit of worldly power. Throughout these temptations, Jesus relied on scripture and resolute commitment to His divine mission, setting an example of resistance against the temptation of physical appetites, sensationalism, and earthly power.
He always started with it is written using the word of God to defeat the temptation.The word of God is symbolized as a blue sword in the armor of God.The sword of the Spirit is the word of God and you can wield it also.The six are Belt of truth, Breastplate of righteousness, shoes of the gospel Of peace, shield of faith, helmet of salvation and the sword of the spirit which is the word of God.
Satan also does not seem to know why Jesus came - to sacrifice himself to save humanity - I guess Satan believed he had won and there was no way to defeat what he had done to humanity in the fall..