If you want to cancel an Xbox subscription, you need to turn off recurring billing. With recurring billing off, your subscription will expire when all remaining prepaid time is used.
You can follow this step-by-step guide on how to cancel your Xbox subscription that is available on Xbox Support, or watch the video below for a visual guide: How to cancel an Xbox subscription
(Note: This video is available in English only.)
Additional Resources:
Need help?
Web - support.xbox.com
Twitter - @XboxSupport
YouTube - Xbox Support
On your console - Xbox Assist app