Sorry to hear that. Do you have any questions related to this?
Changing passwords for your accounts is indeed the first thing you should do. Also make sure you don't reuse any passwords, especially when the login name is the same (often your email address).
Also check whether your services offer Multi Factor Authentication so that it never is enough just to have the password and username.
Additional instructions to deal with the aftermath of a compromised account see;
How to recover a hacked or compromised Microsoft account - Microsoft Support
Within the article, click on the "Click or tap to see steps you can take" dropdown link and take extra not of the 3 links within Step 3.