If you gave the scammer access to your computer you need to do an antivirus and malware check on your computer. If team viewer is still on your computer you need to uninstall it.
After doing the AV and malware check you need check your email account and ensure that no forwarding email addresses been set up and also that no rules that you did not set up have been stored. After doing that change the email account password.
Once you have done that change all passwords to all your online accounts particularly if you use the same password across your accounts.
If your browser stores your passwords you need to clear them out.