If you choose Continue with Apple option on your Mac, at first you will be prompted for your Password. This is Apple’s own solution to make sure only the right person will use this login option, that’s why it asks for the password.
Important: You need to enter the password of your account on your Mac, and not the password for your Apple ID.
If you enter your password for your Apple ID you will see that the prompt is just reappear without any additional message / description.