This is so random, but just this aspect has been stuck in my head. It's a BL, and the MC or was it ML, that parents' bought the apartment building for him, and he had an apartment empty and offered the ML/MC an apartment because of some circumstances.
Any more details like genre, or if was MTLed? Closest thing i got is Entertainment Industry’s Gourmet Food Service where MC’s parents are wealthyish middle class, buys an apartment & house? in the city cause reasons. They distribute each to MC and his older bro, older bro ends up divorcing his newlywed wife cause her fam are schemers who more or less try to scam the apartment out of em
Later, he became a royal healer , maybe? https://chrysanthemumgarden.com/novel-tl/lhbarh/ In Chapter 82, the gong mentioned that he is looking for a house because it is not convenient to brocast gaming from the dorm and the shou said the apartment he is living is in great conditions. The gong said he will pay the rent now to secure the flat. The shou replied it is ok to give it to him because he own this building. This BL is one of my favourite and you should totally check out this one if this is not the one you are looking for.
If my memory serves me right, it sounds kinda similar to Later, He Became a Royal Healer. The MC's family is very wealthy, thus his mom(?) bought him an entire apartment(?) in response to him wanting to be independent