my calender has been hacked
So I was searching for something in google, at that moment something popped out on my screen and I unconsciously pressed ok. Then I saw a change in my calender. There was written that my phone has been hacked and I have to download a software to recover my phone. I pressed download or something like that and then I undoed it. In google I saw how to correct that and did it. There was nothing like that in my calender anymore. So here is my question, " after I opened the link will there be any consequences? Should I factory reset my phone?". There was also written that they are trying to hack my photos. What should I do?
iPhone 11 Pro