OFGEM (Office of Gas and Electricity Markets) [0] imposes retail price caps based on what it considers 'fair' for the retailers, and this came about specifically because retailers were charging standard-variable-rate and pay-by-meter customers excessively as well as having far too many 'offers' that confused customers.
There's nothing to stop the government amending the legislation with a 1-clause Bill that gives OFGEM the power to impose a cap on the energy producers.
I agree about building wind farms. I'm on a farm where a neighbour wanted to install a single turbine for local generation but it was refused - due to NIMBYs in villages 2 miles away complained it would "spoil their view" despite the fact most of them are out at work all day and probably only see that view for 2 minutes a day, if that!
[0] https://www.ofgem.gov.uk/about-us/our-role-and-responsibilit...