Lego designed Interface A, which connects your 8-bit computer to the 4.5-volt lights, motors, touch sensors, and optical sensors. There are a few ways to get an Interface A device.
The easiest way is to purchase set 1093 or 9750. They're identical, but Lego changed their numbers for different countries. The sets include the Interface A itself, a power supply, and a 20-pin female/female ribbon cable. I have purchased and sold about two dozen 9750 sets here in the U.S. since 2016. Most of them work. The most common failure is burned-out LEDs or damaged ribbon cables. Every original power supply worked fine.
If you can't find a 1093 or 9750 set, then sometimes it's easier to get the parts individually. The actual Interface A part number is 70288 or 70455. The former is from 1986 and has round-top LEDs. The latter is from 1987 and has flat-top LEDs. The latter is more common, but they are identical otherwise. You can usually find a handful of 70288/70455 on Bricklink or eBay, ranging from about $25 to about $200.
I acquired a prototype version of Interface A in 2021. Much to my surprise, it works! I'll make a page about soon.
Power supplies are easy. Interface A works with any A/C voltage from 7-15 and a barrel connector. Ribbon cables are even easier. You can readily buy both parts from Amazon or any hobby-oriented electronics company. It should cost you less than $20.