I’ve always been curious about this.
In theory you can buy an extra seat (I think airlines call it something like “extra seat” or “comfort seat”), and if it’s ticketed properly it should stay yours.
But I’d definitely be nervous they’d give it away if the flight is full or something goes wrong with how it’s booked.
Feels like one of those things that works great when it works… but could be a headache if the airline messes it up.
For a long flight though, having that empty middle seat sounds amazing.