The "full" ZAP Browser Extension is automatically added to Firefox and Chrome browsers launched from ZAP.
You can also manually install these add-on, or the cut down "Browser Recorder" extensions:
The ZAP Browser extensions all include detailed help via the popup panel.
If the login URL is static then you can open that page before starting to record.
If the URL is dynamic then you should enter a suitable static URL in the Recorder Dialog. This URL will then
be recorded in the script and the browser will handle the dynamic redirects as required.
In all cases you should start to record before dismissing any dialogs, such as cookie warnings and other disclaimers, as ZAP will need to do the same things.
It is often better to use private/incognito mode when recording so that the browser will not have any existing application state.
The 'buttons' on some modern web apps can be complicated HTML components that are sometimes hard to click on using automation. If your forms can be submitted using the RETURN key then that is often a better option to use when recording.