You're looking for what's called Embedded Programming, which is that low-level stuff where the software you create makes things happen in real life outside of just a computer screen. There are lots of hobby beginner kits that come with things like motors, lights, etc. That's probably your best bet for actually getting some hands-on experience.
If you want something a little higher-level, go for something like a Raspberry Pi (a Single Board Computer or SBC). On these, you'll have a full-fledged Linux kernel and operating system, but still have ways of interacting with hardware like lights and such. If you want to get lower level, try Arduino or something based on ESP32 (the key word here is microcontroller). On these, you'll either use a smaller OS or go "bare-metal". Though note that Raspberry Pi makes things at this level as well (their "Pico" line).
For making that connection between computer theory and programming, I recommend experimenting with microcontrollers. You can even do some projects in assembly and understand what all the key registers are doing. I started on PIC micros, which was a great beginner thing. Not sure if they're still around.
If you want recommendations on a starter kit, let me know your budget and what country you're in, and I can send some suggestions.
Source: embedded programming for 20+ years.