Actually I can’t think of anything that raspberry pi does that can’t be done better by a less expensive alternative.
That has been true even before the price increase - what still makes me use pis now and then is that just so many people are familiar with them, the standardized form factor with lots of extension modules, and the software support - pretty much any software targeting that kind of use has been tested on pi variants.
I’d nowadays go for using compute modules, though - they’re smaller, and you can get them with flash, eliminating the SD card problem many pis had. You can get carrier boards for the compute modules in the classic pi form factor, so you can have the best of both worlds.
A small form factor, small high density connector. Most interfaces are not populated, as on the regular pis, but just lead out via the connector, so you can decide what you want to expose on your compute module carrier. It has a gbit ethernet chip on board, and a pcie chip - rpi4 also has pcie, but it is hooked up to USB3 there. With the compute module you can decide what you want to do with that.