Before we get started with the steps, first try and reinstall Minecraft to ensure there are no corrupt files causing issues. Make sure you save your worlds properly so you don't lose any progress.
If you face Minecraft error Code 0x89235172, the very first thing that you should do is update the Operating System. If updating doesn’t work, follow the below ...
If you see the “Failed to create profile” error in Minecraft Java edition while creating a new profile, use the solutions provided below: Log out and log in again ...