You create a Phantom Guardian Dog in an unoccupied space you can see at a specified casting distance. The guard dog stays in place for the duration of the spell until you use an action to dismiss it, or until you move 100 feet away from it.
Mordenkainen’s Faithful Hound 5e
Casting Time: 1 Action
Range: 30 feet
Components: V, S, M
Duration: 8 hours
All creatures except you view the guard dog as invisible and cannot damage it. When a small or larger creature comes within 30 feet of the guard dog, the guard dog begins barking loudly if the creature cannot speak the command you set during the spell. The guardian dog can see invisible creatures as well as observe the Etheric plane and ignore illusions.
At the beginning of each of your turns, the guard dog attempts to engage a creature within 5 feet of it that is hostile to you. Its attack adds a value equal to the key attribute adjustment of your spell + your proficiency additions. If it hits, it deals 4d8 points of piercing damage.