Passwords in data leak scam on Safari
I recently got a pop up as soon as I signed into a website. Because the website it said was leaked has no important information on it and the notification looked authentic I clicked change password and it took me to a website that had the same logo as the one I was on before but it hadn't loaded properly and it said not secure in the search bar so immediately closed the tab. The day before, when I opened a new tab on Safari at the very top it said another website's password has appeared in a data leak and there was a link at the end saying resecure website or password I can't exactly remember. I am aware that in settings>system preferences you can select detect leaked passwords but I assumed it meant that it would just list them below and and you won't get any pop up or notifications. This happened on a MacBook that I've only had for coming to 4 months. I've had an iPhone 11 for years and never experienced this before. Is it a scam? If so why is it appearing on my laptop, do I have a virus or something like that? Any help is welcome, it's new and expensive and I would hate for it already to have problems.
[Re-Titled by Moderator]
MacBook Air (M1, 2020)