There are many ways to an hacker can gain access to your phone, some do not even require advance tech knowledge, here are a few ways this can happen.
Sim Swap Attack: By using this attack, hackers can transfer your phone number to their own SIM card and take over your accounts.
Spyware: This collects your data. Some spy apps; are quite easy to get hold of and can be used by a person without advanced IT knowledge, This lets them remotely monitor your phone activities. This lets them remotely monitor your phone activities, A person can install such an app by getting direct access to your devices.
Public Wi-Fi: You can be a victim to a malware attack via public Wi-Fi networks or charging stations. Hackers can set up fake Wi-Fo networks, called evil twin networks, to redirect your to malicious websites or steak data via USB cable at a charging station.
Phishing: Phishing text, Facebook or email messages with malicious links that install malware and snatch your data.
Pop-ups: You may download malware from suspicious sites while downloading apps or by clicking on malicious pop-ups or links.