Open the Clock app
Follow this step on your iPhone.
If you only need playback to stop after a set time, the iPhone Clock app is the simplest place to start.
In the Clock app, set Timer End to Stop Playing. Music Timer is for choosing songs that fit a duration.
Start with the steps that match your goal.
Follow this step on your iPhone.
Follow this step on your iPhone.
Follow this step on your iPhone.
Follow this step on your iPhone.
Follow this step on your iPhone.
Follow this step on your iPhone.
Music Timer is for people who want songs to fit a duration, or who want to save and block songs. If the standard Clock app already does what you need, there is no reason to add another app.
See Music Timer on the App StorePlaying songs from the Apple Music catalog requires an Apple Music subscription.

Yes. The exact screens and behavior can vary by iOS version, so check the current screen on your device.
You need one to play songs from the Apple Music catalog. Check the current Apple Music terms for your region.
Check the timer setting, playback state, volume, output, and app version in that order.
Use it when you want songs to define a focus, break, study, chore, or other time block.
If you want a song to mark the duration instead of simply stopping playback, Music Timer is one option to check.
See Music Timer on the App Store