Take a look at this hadith
Ibn Maajah (2482) narrated that Hudhayfah ibn al-Yamaan (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said:Whoever sells a house and does not put its price into something similar will not be blessed therein.”
So my question is, is it prohibited to sell real estate for the purpose of getting money and benefiting from the money by using it to buy something different?
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
It is not prohibited to sell real estate and buy movable property with its price. However, some scholars said that it is not recommended to sell real estate and buy movable property with its price. Al-Math-hari said in Al-Mafaateeh fi Sharh Al-Masaabeeh: “It is not recommended to sell land and houses (immovable property) and buy movable property (chattel) with their prices, because land and houses yield abundant benefits, are mostly not subject to damage, and no one could steal them or raid them and take them away, unlike movable property. Therefore, it is better not to sell a real estate property, and if it is sold, it is best that the price be put to buy a piece of land or a house.” [End of Quote]
Scholars of Hadeeth held different opinions regarding the authenticity of the Hadeeth which you mentioned. Among the contemporary scholars who held that it is inauthentic was Shaykh Ibn ‘Uthaymeen . When he was asked about the authenticity of this Hadeeth, he replied: “The Sharee‘ah evidence indicates that this Hadeeth is inauthentic because when a person sells his house, he is entitled to dispose of its price as he wishes because it is his own property. He may spend the price to buy another house, perform Hajj, give it in charity to support seekers of knowledge, or in any other activity that Allah, The Exalted, has permitted.” [End of Quote from Fataawa Noorun ‘ala Ad-Darb of Ibn ‘Uthaymeen]
Allah Knows best.
You can search for fatwa through many choices