Set a timer. When it ends, the Spotify music you pick starts playing on its own.
If Spotify later says your account isn't registered for the app, open the app's User Management tab and add your Spotify email.
This page is opened as a file, and Spotify can't connect to that. Open it from your website address instead (for example https://your-site.pages.dev/timer/).
Log in once so the timer can play your music. You'll come straight back here.
"This browser" is the most reliable: just keep this tab open. To play on your phone or speaker instead, open the Spotify app there and press Refresh.
Keep this tab open, ideally in front, with your device volume up. Browsers slow down hidden tabs, so a background tab can start the music up to about a minute late. The screen is kept awake while the timer runs where the browser allows it.