Windows 10 LTSC IoT 2021 is the way to go, if you have to use Windows. Gets security updates until 2031 but no new "features".
You can't just pay for it like the Home or Pro edition because Microsoft is not interested in actually selling an OS as a product to users, but https://massgrave.dev/ is your friend.
I will say that 11 LTSC is also a solid option. I run it myself and I don’t have any issues with it, and it lacks a lot of the crap that Microsoft has been trying to shove in.
At some point there might be compatibility issues with Windows 10 (especially with it now being EOL) so if your a gamer 11 LTSC might be the better choice.