There are two factors to consider when buying a house:
First, the current housing prices are high, and there is still room for decline. At least I don't think the house price is in a stable period now, and the wait-and-see atmosphere is stronger. If we look at the rent-to-sale ratio, the house is not worth buying, but China's inherent concept is that no house is like no home, or having a house satisfies his vanity.
The second is: your own actual situation. If you want to settle down in Beijing for a long time, answer questions at work, do not change frequently, and educate your children, you can consider buying a house.
Besides investing, if you want to buy a house, you can't invest even if you have the best investment opportunities. After all, investment is risky, and no one can guarantee that you will make money after investing.
If you can't buy a house temporarily according to your actual situation, then consider the way out of the funds at hand, because the income of village banks is too low. You can determine the investment cycle according to your future spending time (such as planning to buy a house), and participate in some bonds and bank wealth management products with guaranteed capital. But I don't think you should invest in the stock market at this stage-unless you don't use this money for 10 years, once you get stuck, you won't have a chance to buy a house.