Yes you can stop the automatic renewal if you don't want to continue the Apple Music service after the trial ends. You can turn off the subscription renewal at any time. This site will show you how. View, change, or cancel your subscriptions - Apple Support