People often forget about the dust buildup inside the case - it clogs the heatsinks and fans, which makes the system throttle the CPU to avoid overheating :/ I noticed once that my laptop suddenly got slower and the battery was draining faster. Opened it up and there was such a dust ball inside that the radiator could barely breathe. After cleaning it - like brand new, didn't need any optimizations at all.
On top of clearing disk space and startup programs, which have already been mentioned, it makes sense to periodically blow out your computer with compressed air or at least vacuum it with a slot for ventilation from underneath. If your laptop is old or you're in a dusty environment - do this every year or so, no less. Way cheaper than replacing hardware 😊