Raspberry Pi is when you need either GPIO or a small size. You are also paying premium for a long-term support and a lot of information on the web.
If you don't need all of those features, don't use them. Used NUCs are better value if you need a general desktop computer. Chinese embedded SBCs are much cheaper if you are can handle missing/wrong documentation, weird kernels and a model disappearing only after a few years.
I'd say that the mini/micro PCs are better if you simply aren't io, power or space constrained. When you look at total cost for an RPi with an enclosure, storage, power, etc... the cost favors the mini/nuc when power isn't a concern. Space is the only other point of major concern for some use cases IMO (and G{IO).
When the RPi availability really sucked, I just started using MiniPCs for a few projects... in the end, I replaced my router, home server and a few other bits with a couple relatively powerful Mini options. They sit in the closet, don't use much power, aren't too loud and just work.
I did the same. The other benefits of the NUCs is they often have M.2 slots without surgery or extra add-ons and it's easy to find models with dual Ethernet.
On mine I bonded the interfaces so I've got a "free" 2Gb connection despite my switches only being gigabit (between each other). I've also added storage that's actually reliable rather than having to pray to the SD card gods.
I'm also much happier with DC adapters with barrel connectors rather than also having to hope for the best with USB-C power. It took a couple adapters before I got one that would reliably power my RPi4.
Raspberry Pi is when you need either GPIO or a small size. You are also paying premium for a long-term support and a lot of information on the web.
If you don't need all of those features, don't use them. Used NUCs are better value if you need a general desktop computer. Chinese embedded SBCs are much cheaper if you are can handle missing/wrong documentation, weird kernels and a model disappearing only after a few years.