>>12688303muhammad destroyed all the idols in the kaaba. in the early islamic days muslims prayed in the direction of the temple mount same as jews do but allah commanded mohammad to chnage the direction of the prayer towards the kaaba to be different from the jews
https://islamqa.info/en/answers/1953/why-was-the-qiblah-changed-from-bayt-al-maqdis-jerusalem-to-the-ka146bah-makkah