OK, so this is sooo far off topic that I can see it coming back round from the other side of the page...
However, Pharaoh ants are about the only ones small enough to be doing what you describe. They love to live in small, warm places. They have an interesting method to combat being eradicated either by poisons or crushing. As soon as they feel they're under stress, the colony will bud, sending off new colonies to breed elsewhere.
So, this isn't a problem for your phone - put the phone in a plastic bag with a tiny squirt of ant poison spray. Seal the bag, bye bye ants.
Your real problem will be... where are all the others?
There's little chance a small colony like that will be the only one in your home, & no chance that a can of bug spray can eradicate the rest.
You need bait food to get rid of the others.
Have a read about how much 'fun' it can be trying to get rid of them - https://www.doyourownpestcontrol.com/phar.htm