NEVER click on a link sent. Always go to the 'website' direct or 'ask the friend' about the link as even your 'friends' on Insta, FB, Twitter etc. can have their accounts hacked and taken over and then when a 'link' is sent from your friend, it's really a takeover.
You are VERY lucky that clicking that link didn't take over your entire phone or computer.