Mordenkainen's Sword
You create a spectral sword that hovers within range. It lasts for the duration.
When the sword appears, you make a melee spell attack against a target within 5 feet of the sword. On a hit, the target takes Force damage equal to 4d12 plus your spellcasting ability modifier.
On your later turns, you can take a Bonus Action to move the sword up to 30 feet to a spot you can see and repeat the attack against the same target or a different one.
Mordenkainen's Sword 5e 2024 vs. 2014 edition differences
The 2024 version increases range from 60 to 90 feet, changes duration to "up to 1 minute," raises damage from 3d10 to 4d12 plus spellcasting modifier, and allows moving the sword up to 30 feet with a Bonus Action, compared to 20 feet in 2014. The attack target is within 5 feet of the sword in both.