When the first raspberry was introduced, it was really really hard to interface an electronics project with the internet. Arduinos were really dumb at the time. That's why the raspberry was so ideal. But most electronics projects didn't really need a whole linux distro running on it. It was just that there was no other option.
The ESPs introduced a totally new class that can cover most of the usecases of electronics projects that the raspberry originally aimed at. They support wifi, bluetooth, pretty serious processing, enough for most connected projects. They totally ate the raspberry's lunch in the embedded market. Of course the RP2040 aims for this too but IMO it's kinda too little too late, the ESP32 is already so well established and has the biggest community.
At the other end of course the PC pricing came down and the intel N100's and the like eat its lunchon the other side.