If you encounter access denial while attempting to connect to a Mac, consider the following potential issues:
Incorrect Mac User
Verify that you are using the credentials of a registered Mac user on the target device. Refer to this article to identify the correct user. Additionally, double-check the accuracy of the password.
Insufficient Permissions
Ensure that the user is either listed in the "Allow access for" section or set to "All users" in System Settings > Sharing > Remote Management and Remote Login (if enabled).
Reset Remote Management
Resetting Remote Management can resolve issues. Navigate to System Settings > Sharing, and toggle Remote Management. Confirm that both "Observe" and "Control" are enabled under Options. If already enabled, attempt toggling them off and back on.
Firewall Configuration
Check if "Automatically allow built-in software to receive incoming connections" is enabled in System Settings > Network > Firewall > Options…
You can also try toggling this option and the Firewall off and back on.