Phazonfish
B-Rank Agent
The main feature I was focusing on was grounding a flying creature or keeping a creature at a distance while attacking it with ranged weapons and spells while possibly preventing it from successfully attacking you, unless it had spells or abilities to attack creatures from afar.
Earthen Grasp also inflicts the restrained condition, Levitate and Hold Person can prevent enemies from positioning on you, and if you want to ground something you can use Earthbind. All of these are 2nd level.
Also, anything that induces the frightened condition prevents enemies from approaching you and gives disadvantage on attacks even if they have ranged ones, many options coming before 6th level.