You did not share anything
Block and report the sender, warn the real friend through another channel if their account may be compromised, and keep the screenshots.
Do not continue the conversation to gather more evidence.
You shared a code or changed account details
Use the platform's official recovery process immediately. Secure the connected email account, change reused passwords, review active sessions, and enable multifactor authentication.
Never use a recovery link supplied by the person who contacted you.
You sent money or financial details
Contact the payment provider or financial institution now, preserve transaction records, and report the fraud through the appropriate official channels.
Account recovery and payment recovery are separate workstreams.