https://youtu.be/5fXbvluYcfw?si=MHmZQCLcSfW8QcKb The bible said that idols made of stone, wood, or metal are the hand work of man, it doesn't have the power or ability to hear, speak or save someone so any prayer that is directed to them is futile.
First and second commandments forbids having another god or carving any image for worship because God is a jealous God. God wants all heart devotion and will not share his glory with anything else.
Involving in idle worship creats a separation and a spiritual barrier between God and someone. The elders of Israel set up idols in their hearts and God asked, why should he listen to them.
The teachings of Apostle Paul said that sacrifice that is given to idols are offered to demons not God, and the demons also help in separating people from the true God.
In the process of God expressing his anger and bringing judgement upon idol worshippers, God is also ready to offer mercy and salvation to those who reject the idols and repent.