Hey Yuqing,
Firstly, congratulations on making it through medical school! Not an easy feat by any means.
As a financial advisor who has many close friends who are currently in residency, I would say one thing that often times gets overlooked is the value of your time in residency. Without knowing what specialty you're in, I know some residents could be working overnight shifts semi-regularly and 70-80+ hours a week. Owning a home, managing repairs, collecting payment from tenants...all these things take time away from you and you might not even have that much time to begin with.
Most of the residents I see opt to rent a place with roommates to offset the cost of housing. For example, if you got one of those places that charge 3.5k/month and got a roommate to share in the cost of rent, you'd be all in for 1.75k/month. You wouldn't have to worry about buying a home, repairs, anything.
At the end of it all, once your residency ends, more likely than not you will be making very good money via your work as a doctor. From then, you can pay down your loans very quickly and invest to set yourself up for success. Just another perspective to consider.