Experienced cyclist here.
There's another thread on cycling that's full of good advice on here, so worth having a search for that.
If you're new and want a solid all-rounder and £400 to spend, I'd look at Decathlon. They have some excellent deals on and on a budget are probably the most solid bang for buck option. Go for either a flat bar hybrid or a 'gravel' style bike. You'll get larger tyres, mudguards and options for mounting racks/panniers if you want for commuting. These style of bikes will also have more generous gearing and a more comfortable relaxed geometry than full on road bikes.
One thing to note: almost every new rider - and I mean 99% here - buys bikes that are too big for them. Try before you buy. And when you've decided on one, you'll almost certainly be better off sizing down.
And almost all riders (including some experienced ones) ride with saddles way too high.
Take somebody with you who is an experienced cyclist and can identify a good riding position. The fit of a bike is the most important thing and is the difference between falling in love with an amazing hobby and sport, and going for one ride, deciding it's horrendously uncomfortable and throwing the bike in the shed for the next 10 years.
The GCN YouTube channel is full of tons of advice for new riders:
https://www.youtube.com/channel/UCuTaETsuCOkJ0H_GAztWt0Q
And Francis Cade, a great cycling vlogger has a whole series on bike fits, search 'Bike Fit Tuesdays' on his channel:
https://www.youtube.com/@Cade_Media