

Probably the best way is to unplug it from the charger and remove the battery.
You can’t effectively use the device while it’s not vulnerable to attack.
What kind of eavesdropping are you worried about? I ask because concern over advertising is different than concern about laser listening (a technology that was available to me in kit form as a middle school student many years ago).
It’s not reasonable to ask how to avoid all eavesdropping because without any context you quickly start wondering if you could recover from being rendered and detained for the maximum legal duration in your jurisdiction.
Some third party headphones and stuff show up like this.
Go ahead and shut down the apps you have open, restart the phone and once it finishes restarting, turn on lockdown mode, install any updates asap and then do the privacy check up.
You want to restart to get before first unlock security back on, then turn on lockdown mode because a lot of device and inter process communication gets disabled and if the problem keeps coming back you’ll know to start looking somewhere else. You want to check for and install updates because updates contain security fixes. The privacy check up will tell you what stuff you’ve given access to various ins and outs of the phone and that may tell you something useful.