A combination of factors most of which meant going without for years when we were younger.
I got on the housing ladder very young - I bought my own flat and worked 2 jobs to pay the mortgage. I couldn't afford a phone, a washing machine, a car, a cooker or even a wardrobe but it paid off in the end
DH salary sacrificed for over 20 years to acquire notional shares in the private company he worked for and then got over a million pounds when the company was bought out. The salary sacrifice meant we had to live very frugally when DC were small, second hand clothes for them and us, no holidays etc but it all worked out well
The absolute miracle of compound interest. We overpaid our monthly mortgage as often as we could, sometimes by only £20 a month, sometimes by a lot more. It lead to us being mortgage free by our mid forties. Similarly, we paid into pension schemes from age 22 which have accrued in value so I have private pensions that give me a solid income now. DP hasn't retired yet because he loves his work but he has a very healthy pension fund for when the time comes.
We are in our sixties now and set up for life. We can afford all the treats (theatre and travel for me, gigs and football matches for him) we didn't have when we were younger and appreciate them so much. We both inherited money when our DPs died and were in the happy position of being able to able to pass most of it on to our DC and my niece and nephew because we didn't need it.