Just to add to this train, I've run at least 10 Pis on microSD cards averaging 3 years each (mostly Pi 4s, added a couple Pi 5s), and have not had one issue on any of them... it's mostly down to using a good microSD card (I settled on SanDisk brand), a good power supply (good PoE+ HAT or official PSU), and not writing tons and tons of data to microSD (use NVMe or USB SSD/HDD if you need that).
Just to add to this train, I've run at least 10 Pis on microSD cards averaging 3 years each (mostly Pi 4s, added a couple Pi 5s), and have not had one issue on any of them... it's mostly down to using a good microSD card (I settled on SanDisk brand), a good power supply (good PoE+ HAT or official PSU), and not writing tons and tons of data to microSD (use NVMe or USB SSD/HDD if you need that).