Regarding SSD usage: Read/write capacity is extremely high, and isn't something you should be thinking about. It should have about 256 TB written in each cell (
https://www.enterprisestorageforum.com/hardware/ssd-lifespan-how-long-will-your-ssd-work/). For most users, the machine will stop being usable long before the drive gives out. There's also wear leveling too. If you're using the machine professionally (think: video production, graphic design, etc), it's best practice to keep the information you're working on external hard drives.
Regarding longevity. They last a very long time, if taken care of physically. A good rule of thumb is:
7 years of MacOS Support from the time the machine is first sold. So until around 2031.
2 years of security patches after MacOS Support ends (but it won't be fully secure). So until around 2033. This is probably the absolute cutoff point for most people because it'll be difficult to connect iPhones/ Apple Watches/ Vision Pros/ whatever to the Mac.
3 years of mainstream browsers support after security patches are no longer supported. So until around 2035.
2 years of continue being able to access financial and other high security websites on unsupported browsers (it takes time to update websites to new standards). So until around 2037.
10 years (or thereabouts) of accessing websites with degrading abilities as retro computing enthusiasts develop special browsers for unsupported systems (think TenFourFox for PowerPC G4 processors). So until around 2047.
10 years after that to access wi-fi networks. New standards will come along, and eventually MacOS won't be able to connect to the wifi network. So until around 2057. At that point, the machine is pretty much worthless.
Or, to use a scary analogy (because of how old it is), it's like trying to connect to the internet and use a Powerbook 5300 today (released 29 years ago).
But worrying about SSD or hardware failure should be the last thing on your mind.