Pi and Arduino's are way overpriced as these organisations have become more and more commercial. I highly recommend buy cheaper boards like ESP 32 for personal IoT projects.
The equivalent of to the ESP32 would be the Rasperry Pi Pico 1 / 2 / W. They start at $4, which is a fair price.
ESP 32 S3 can now run Linux and for most tasks it's much better than a Pi and dirt cheap (about 1 USD)