The short answer to this question is yes, but there are multiple factors which will dictate whether this is possible for you:
your savings rate
whether this is actually what you want
2 ways this can be achieved
investing in the stock market through index funds and individual stocks
The fire movement is a collection of people who aim to have finical independence and retire early a common way they achieve this is using the 4% rule.To do this they invest in index funds commonly the s&p 500 which on average returns 8% a year they then withdraw 4% once there retirement account is big enough to start withdrawing from. Another way you could do this is simply investing in high yield dividend stocks and index fund and living of the dividends you receive. For this you’ll likely need £500000 or more id argue most people would at least need £1000000 obviously as you could imagine this can take a long time to reach due to the relatively low returns.
investing in real estate
Another solution to this is investing in real estate for each standard rental with a mortgage an average monthly cashflow might be £200-£400 and to achieve this you may need £20000-40000 in upfront investment(don’t take this as a set in stone number as it changes from area to area). To achieve a yearly salary of £40000 you would need 9-17 properties based on these assumptions which may cost you around £360000.
you may want to try a hybrid approach of these investing in real estate using a job/business then using rental profits to pay for stocks until real estate hits you goal income and your stock portfolio could be a safety net or an income for holiday etc using the 4% rule or by spending the dividends.
Theres no set way on how this can be achieved but everyone can retire early just pick what you believe will work for you and go for it, its important to note stocks will also require less ongoing work than real estate but obviously more money is need to reach the same outcome.