Jews historically prayed in the direction of the Temple of Solomon in Jerusalem. Western wall is the part of that temple that still exists. However, Jews are forbidden from going up the Temple Mount after the destruction of temple.
In the Bible, it is written that when the prophet Daniel was in Babylon, he “went to his house where he had windows in his upper chamber open to Jerusalem; and he got down upon his knees three times a day and prayed and gave thanks before his God, as he had done previously (Daniel 6:10). Jews around the world pray towards Jerusalem to this day.
پھر غامدی صاحب نے لکھا ہے کہ بیت المقدس کی تعمیر کے وقت بھی قبلہ مکہ مکرمہ میں ہی تھا، کیا تورات میں اسکا کوئی اشارہ ملتا ہے۔
There is no sufficient evidence for this. Bible certainly does not state this. Many western scholars have challenged this belief, stating that the sanctuary in Makkah did not exist before the end of 7th century AD, and no independent source other than early Muslim history testifies to the existence of a sanctuary in Makkah before the time of Abdullah bin Zubair (approx). Most notable of these scholars are Crone and Cook, Stephen Shoemaker, Tom Holland, and Robert Hoyland etc. So this is a controversial topic, and some revisionist Muslims also do not face Makkah for prayers, facing Jerusalem instead. Please see “The Natural Republic” chapter on Hajj published by Brainbow Press.