See support article.
https://support.lastpass.com/s/document-item?bundleId=lastpass&topicId=LastPass/Use_the_LastPass_Mac_App_install_log_in.html
Thank you @jepenny for your prompt response. I have followed the steps in the article, but get blocked at step 6 (On the login screen, enter your email address andmaster password, then selectLog In) as the LastPass login screen does not appear.
In case I was doing something wrong, I uninstalled LastPass and the browser extension and followed the steps again. Unfortunately, I got the same result.