Hi,
Digital purchases such as a Windows 10/11 Pro license are generally non-refundable. However, since this was an accidental purchase, I recommend contacting Microsoft Support as soon as possible to explain the situation and request a refund. While it is not guaranteed, Microsoft Support may be able to review your case and determine whether an exception can be made.
Click this link: https://support.microsoft.com/contactus/
Sign in to your Microsoft account.
Select Windows > Click 'Get home support'.
Type "Chat with an agent" from the text field and press Enter.
Click "Contact support" at the bottom.
Select the product you need help with.
Follow the prompts to connect with a live agent or request a call back.