Minecraft uses your Microsoft account for sign-in and progress sync. However, you need to reset the account if you forget the password. Visit https://account.live.com/password/reset from any device, enter the details and set up a new password. Use the new information to sign in to your Minecraft account.