My question is about dealing with non-Muslims temples when Islam is in power. It is said in some ḥadīths that don't destroy the old temples or prayers places of non-Muslims but when Muslims got victory over Mecca the Prophet himself destroyed the idols of many gods which were inside the Kaba. So what was the situation there and in present time what should we do with this issue?
Islam claims that Ka'bah was built by Abraham and it was center of monotheism. It was later desecrated by putting idols to be worshipped there. The Prophet [pbuh], according to Islam, was sent to purify the house of God of the filth of polytheism and establish tawheed in Arabia. Islam established the veracity of the Messenger and His claim through various arguments and did not allow polytheists to live in Arabia while rejecting the truth the Prophet has established without a shadow of doubt. They were to be fought with and killed if they did not accept the religion. There was no place for them in Arabia. The Prophet [pbuh] was granted victory through the hands of the believers. This is similar to Allha's help to the previous Messengers. They were at times helped by God through natural calamities on their opponents when their followers were few in number.
As for the other religions who claimed to follow monotheism they were not treated like polytheists. They were allowed to live and worship God according to their religion provided they were subdued and lived under the authority of Islam.
However, this divine was specific with the age of Rasool who could have established the veracity of their claim without a shadow of doubt and it could be ascertained through Allah Almighty that a certain group belied the Messenger knowingly and merited divine punishment. Today this is not possible and we cannot destroy the idols of even polytheists. This is because we cannot know if they are knowingly rejecting the message of Islam or have fallen in polytheism due to confusion or doubt.