I'd argue that the first temple was really in the city of Shiloh, but this aside, the Rambam wrote:
This is why our kingdom was lost and our Temple was destroyed and why
we were brought to this; for our fathers sinned and are no more
because they found many books dealing with these themes of the star
gazers, these things being the root of idolatry, as we ...