There's no definitive answer to this question since every situation is different, but typically you would need to wait at least five years after defaulting before being eligible for a mortgage with a high street lender. This is because high street lenders want to be sure that you're in good financial shape and have recovered from your previous financial setback before lending you money.
The UK mortgage market is very competitive, so there are many lenders who will be happy to work with you even if you have had some financial difficulties in the past. Which means it is possible to get a mortgage after defaulting, but you should expect higher mortgage rates and most likely a specialist lender.
To give yourself the best possible chance with lenders, you have to re-establish a good credit history, which usually means being timely with your payments on all other debts and be prepared to provide lots of documentation and answer lots of questions about your current and previous financial situation.
If you can demonstrate that you've made significant strides in improving your credit score and overall financial situation in the last few years, then you may be able to get a mortgage with a high street lender sooner. So, start planning now, and get on track with your finances if you want to buy a home within the next few years!