You can cancel your Apple Music subscription on a Mac using iTunes if your Mac is running macOS Mojave or earlier. Here's how to do it.
You can change your iCloud account on an iPhone with a few taps, and you can also use a separate account for your iTunes & App Store purchases.