I've recently looked into this in some detail and the situation is actually a lot more complex than you might think looking from the outside in. This is an interesting article on how energy markets arrive at their price (it is incomplete, and a bit dated, but still useful):
https://neon.energy/Blume-Werry-Faber-Hirth-Huber-Everts-202...