Deuteronomy 4:19yareach
When you look up at the sky, you see the sun, moon, and stars, and everything in the sky. But don't bow down and worship them, because the Lord your God has made these things for all people everywhere.
Israel is told not to worship the moon.
2 Kings 23:5yareach
The kings of Judah had chosen priests for these gods. These priests burned incense in the places where gods were worshiped in the cities of Judah and the towns around Jerusalem. They burned incense to Baal, the sun, the moon, the planets, and all the stars of the sky. But Josiah took those priests away.
Josiah removes priests who burned incense to the moon.