Hello Brian,
Thank you for posting your question on the Microsoft Windows Forum!
I'm sorry to hear about the accidental purchase.
Step 1: Check the Purchase Details
Please sign in to the Microsoft account that was used to make the purchase and review the order history:
https://account.microsoft.com/billing/orders
Verify:
The item that was purchased.
The date of purchase.
Whether Minecoins were used for the purchase.
Step 2: Submit a Refund Request
If the purchase was made by mistake, you can contact Minecraft Support and submit a refund request:
https://help.minecraft.net/hc/requests/new
Please note that refunds for Minecoins and Marketplace content are reviewed on a case-by-case basis and are not guaranteed.
I hope this answer has provided you with useful information. If so, please click "Accept answer" and consider upvoting it. This helps other community members find useful solutions to similar problems.