Music Shutoff Timer
Many audio receivers and stereos have a built-in “sleep timer” that automatically disables playback after a certain amount of time. The iPhone does, too. It’s just hidden in the Clock app.
Just open the Clock app and tap on Timer. Then set a time, tap on When Timer Ends, and scroll all the way to the bottom of the display. You should see Stop Playing — select it. Once the timer ends, it’ll disable all audio playback. That includes music, movies, or podcasts.