The phantoms annoy me if they always teleport from one place to another and if you kill them they will disappear again. I believe that the phantoms are and if not I mean the black long zombies with the purple eyes.
Bow, sword, sleep
Sleep, then spawn no. In the sun they burn and otherwise you wait until they fall on you and then… Sword! Bow o. Crossbow is also good, especially with scattered shot.
"the black long zombies with the purple eyes."
They are Enderman, not phantoms. Phantoms fly and attack at night if you have not slept for a long time.
Enderman are basically peaceful. If you look at them they attack, if you want to attack them they teleport themselves.
To kill them you have to attack their legs, then they do not teleport. You can't attack them with the bow.