The first step is to clean your machine. Your ex might have stolen your passwords while you were together. However, he might have put a keylogger on your system.
Once your computer is secure, it's time to reset all your passwords. That means your Windows account passwords and online account passwords. Remember to make them strong.
Don't just change the accounts that were hacked. Your ex could have all your passwords. You don't want him getting into things like your bank account.
Be sure to change your account security questions as well. These are usually based on personal information. Your ex might know the answers.
Hopefully, changing your password will keep your ex out. However, he might have locked you out. What can you do if you can't get in? Learn how to recover a hacked account here.