However, sometimes you need GPIOs especially for school projects.
Yes but think about this, for a simple school/electronics project you can get even an old RPi 2B+ for around 10$ nowadays that will get the job done. For a NAS / media center / selfhosting any second hand machine will be a better choice. I wouln’t even mix the two into a single board.
There are also other brand new cheap SBCs that might work for your electronics such as the Radxa Zero 3W or the Zero 3E or even the Raspberry Pi Zero W. The point is that it doesn’t make sense to buy a standard and expensive RPi for things that don’t require much CPU. If you don’t really need an OS and you code C or MicroPython a 3.5$ ESP32 board as well.