There are many cheap system-on-a-chip microcontrollers that have enough computing power for many basic uses for which RPi is overkill, and some GPIO and built in wifi and/or bluetooth wireless, and they support dev frameworks like arduino or micropython.
Another comment mentioned a bunch of other models, but I had some fun with the Espressif ESP32 platform where the bulk chips are like $4 each (depending on quantity) but there are some nice beginner-friendly devkits using the same chips for $15 like https://docs.m5stack.com/en/core/atom_matrix or https://shop.m5stack.com/collections/m5-controllers/products... that are sufficient for a bunch of tasks.