Here the answer depends on how the hacker hacked you.
- QRLJacking, WhatsApp web attacks - Both these methods are basically the same. This hack is done with your WhatsApp web,hence it's easy to counter. In this case you will get a persistent notification in your phone about active WhatsApp web account. Click on it and select logout from all computers. Watch the video bellow.
- SS7 attack,Mac address spoofing — This is also easy to counter. This is because we will be logged out of our account. To fix it just re enter your number to get the OTP message.
- RATs and spy apps — These are the most difficult hacks to fix. I have written on how to stop these softwares in an another question. I will copy it here for you. Following steps works on most of the RATs and spy apps. They are,
- Delete any .apk file you are suspicious off.
- Go to settings, then “ App management” in phone. Then click on the “ Running ” tab. Here you can see all the active services. Look the list carefully . Look at the left side of each app. There you can see their size and time they have been in use.
- Check out all of the apps in Google to verify that they are necessary. If you find anything unsual click on that and then click stop. Then go to the “Downloaded ” tab near the “Running ” tab and select the app name you noticed in the running tab,click on it then click uninstall.