The day after Jesus entered Jerusalem on a donkey's colt, to shouts of "Hosanna!" and "Blessed is He who comes in the name of the Lord!" He went to the temple and drove out the merchants overturned their tables. And He said, "Is it not written, 'My house shall be called a house of prayer for all the nations'? But you have made it a den of robbers!" (Mark 11:17)
All three of the synoptic gospels -- Matthew, Mark, and Luke -- tell of Jesus cleansing the temple after His triumphal entry. This would have been on the Monday before He was crucified on Friday. But the book of John records something different. It says Jesus cleansed the temple way at the start of His ministry, a few years before He was crucified. What gives?
These are actually two separate temple cleansings. It's in John's story where Jesus famously made a whip of cords, which He used to drive everyone out and He overturned their tables. But it's in what Jesus said that we see the biggest difference between the two cleansings.
In the first cleansing, He said, "Take these things away; do not make my Father's house a house of trade" (John 2:16). But in the second cleansing, He said, "My house shall be called a house of prayer." In the first cleansing, the temple was His Father's house. In the second, He called it His house.
And rightly so: Jesus is God, and it has always been His house. But the second cleansing was right after the triumphal entry, announcing Himself as King, that He referred to the temple as "My house shall be called a house of prayer, for all the nations."
Jesus gave His life to purify for Himself a people from every nation (Titus 2:14), that we might become a spiritual house unto the Lord, when we understand the text.
"These I will bring to my holy mountain, and make them joyful in my house of prayer; their burnt offerings and their sacrifices will be accepted on my altar; for my house shall be called a house of prayer for all peoples.” Isaiah 56:7
"As you come to Him, a living stone rejected by men but in the sight of God chosen and precious, you yourselves like living stones are being built up into a spiritual house, to be a holy priesthood, to offer spiritual sacrifices acceptable to God through Jesus Christ." 1 Peter 2:4-5