I don't think you can. You can't "cancel" it as such, the trial will continue until the first renewal period. You can cancel automatic renewal at that time and it won't renew. Well, you can cancel it immediately if you contact iTunes support but I very much doubt that will get you a chance to try it again for free.
Manage your Apple Music membership - Apple Support - https://support.apple.com/HT204939
"Learn how to change from an Individual membership to a Family membership, turn off automatic renewal, or join Apple Music later." Turn off automatic renewal and your membership will finish at the end of the current subscription period.