Hi, good day!
Are you downloading it from the Microsoft Store app?
What is your current Windows operating system and version?
Press Windows key+R to open Run then type: winver
Press Enter
Please take a screenshot of the resulting window and post it in your next response.
Please try to download both x86 and x64 of the latest Java using the link below.
x86 - https://javadl.oracle.com/webapps/download/AutoDL?BundleId=248240_ce59cff5c23f4e2eaf4e778a117d4c5b
x64 - https://javadl.oracle.com/webapps/download/AutoDL?BundleId=248240_ce59cff5c23f4e2eaf4e778a117d4c5b
Note: If you are asked to uninstall a previous version, uninstall it.
After that, download Minecraft legacy from the link below:
https://aka.ms/minecraftClientWindows
I look forward to your update and am happy to continue working with you until the issue is resolved. If you find the answer helpful, please click "Accept Answer" and consider upvoting it. Otherwise, please keep me posted by clicking "Add comment" below instead of selecting Yes or No.
Standard Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.