Choose the Xbox Game Pass subscription you want to cancel and select Cancel subscription. Then follow the steps to complete the cancellation. If eligible for a refund based on timing, you'll see ...
Click on the Subscriptions tab in the left sidebar. In the Game Pass section, click on Manage. Then click on Cancel ...
You can refund a game on Steam if you request the refund within two weeks of purchase, and have played the game for less than two hours.