Here’s the warning that Apple’s subscription page does NOT give you for Apple Music trials:
Press cancel on your Apple Music free trial and you lose access to it immediately. You don’t get to use the remainder of the trial. You lose access instantly, with no warning.
Apple Arcade gives you a warning. Why can’t Apple Music give you a similar confirmation dialog, saying “Your service will end immediately”?

Most other free trials, for example, Amazon Prime, Disney+, Spotify, etc., allow you to use the remainder of the trial, but not Apple Music.
This happened to my wife – she signed up for a 3 month trial, then cancelled it the same day, hoping to avoid automatic charges when the trial ends. She was surprised and disappointed she lost access immediately. 3 months of music goes poof!
Even Apple Senior Advisor support no longer have any power to reinstate Music trials. They point you to a buried terms & conditions clause that barely covers the situation and say their hands are tied.
If you don’t like this policy, or you want Apple to create an “Are you sure?” warning within the Subscriptions page when you press cancel, Apple Support encourages you to submit feedback to the Apple Music team.