As others said, despite a fair few people over the years irl saying its cheaper to buy phone outright, tgen get contract seperately, ive never found that to be tge case when looking at total cost of ownership over 24 months or whatever length youre looking at. Or it's been so marginal, I'm happy to just buy it all through the carrier (Vodafone in my case...)
Perhaps as other have said, if happy to use a carrier/supplier outside the big few companies, the saving becomes more lucrative. I now tend to buy latest Galaxy + phones, used to get previous version 10 years or so back, and didn't notice any real saving when buying phone and contract together or seperately...perhaps if buying older non 'flagship' model there is more of a difference.
If you go down smaller supplier route, it's worth checking which carrier they use and if they are using the carriers full infra capabilities. I can recall in past looking at potentially bundling in Virgin as already use their broadband and was thinking of also getting their TV packages (the more products you take, the better the 'value'.)
Upon looking into it and discovering Virgin used Vodafone as carrier (I think), it also transpired they weren't using Vodafone 5g infra or may have even been 4g... can't recall now. So I abandoned that idea... this was a few years ago, so virgin may have uograded the tech they offer now. Depends what's important to you when taking out a deal.