How do you protect yourself from negative energies?
Become more spiritual. The more authentic spiritual practice you do the more you purify and elevate your level of resonance and level of consciousness.
As your resonance starts to transform and become more spiritual in nature you will find that negative energies are no longer attracted to you or magnetized towards you and your aura.
Negative energies thrive and survive on negative energy, thoughts, feelings, actions, and emotions; authentic spiritual practice transitions all of that.