You can let the parts be replaced by authorized repair shops. You can't do it yourself, you have to pay a hefty markup. This makes the replacement uneconomic for many older devices, thus creating e-waste.
3rd party repair shops don’t charge a heavy markup, which you can see by actually looking up prices. They need to compete with both Apple and people just buying a new device.