Don't throw out your old medications! With supply chain issues and social volatility, keeping a back-up supply of meds is a good idea.
Placing a medication in a dry, cool, dark place, such as a refrigerator, will help a drug remain potent for many years.
Here is a list of meds that are useful to have on hand: https://archive.org/details/WhereThereIsNoDoctor-English-DavidWerner/page/n380/mode/1up
Testing by the US FDA of over 100 drugs showed that ~90% were safe and effective as long as 15 years past their original expiration date. Excluding nitroglycerin, insulin, and liquid antibiotics, most medications are as long-lasting as the ones tested.
https://www.health.harvard.edu/staying-healthy/drug-expiration-dates-do-they-mean-anything