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.