Over the years you plan to stay, is it cheaper to keep renting or to buy? Compare the real cost — deposit, mortgage and the equity you build — and find your break-even year.
An estimate, not advice. Assumes a 25-year mortgage, ~7% purchase costs (transfer, agent, mortgage) and ~2% to sell. It does not model the return you would earn investing the deposit instead, or maintenance beyond the service charge — real factors, so treat the break-even as a guide. Change any figure to match your situation.