Source: Tasha's Cauldron of Everything

3rd-level necromancy

Casting Time: 1 action
Range: 90 feet
Components: V, S, M (a gilded skull worth at least 300 gp)
Duration: Concentration, up to 1 hour

You call forth an undead spirit. It manifests in an unoccupied space that you can see within range. This corporeal form uses the Undead Spirit stat block. When you cast the spell, choose the creature’s form: Ghostly, Putrid, or Skeletal. The spirit resembles an undead creature with the chosen form, which determines certain traits in its stat block. The creature disappears when it drops to 0 hit points or when the spell ends.

The creature is an ally to you and your companions. In combat, the creature shares your initiative count, but it takes its turn immediately after yours. It obeys your verbal commands (no action required by you). If you don’t issue any, it takes the Dodge action and uses its move to avoid danger.

At Higher Levels. When you cast this spell using a spell slot of 4th level or higher, use the higher level wherever the spell’s level appears in the stat block.

Spell Lists. Warlock (Optional) , Wizard (Optional)

Undead Spirit
Medium undead
Armor Class: 11 + the level of the spell (natural armor)
Hit Points: 30 (Ghostly and Putrid only) or 20 (Skeletal only) + 10 for each level of the spell above 3rd
Speed: 30 ft., fly 40 ft. (hover) (Ghostly only)
STR DEX CON INT WIS CHA
12 (+1) 16 (+3) 15 (+2) 4 (−3) 10 (+0) 9 (−1)
Damage Immunities: necrotic, poison
Condition Immunities: exhaustion, frightened, paralyzed, poisoned
Senses: darkvision 60 ft., passive Perception 10
Languages: understands the languages you speak
Challenge:
Proficiency Bonus: equals your bonus
Festering Aura (Putrid Only). Any creature, other than you, that starts its turn within 5 feet of the spirit must succeed on a Constitution saving throw against your spell save DC or be poisoned until the start of its next turn.
Incorporeal Passage (Ghostly Only). The spirit can move through other creatures and objects as if they were difficult terrain. If it ends its turn inside an objects, it is shunted to the nearest unoccupied space and takes 1d10 force damage for every 5 feet traveled.
Actions
Multiattack. The spirit makes a number of attacks equal to half this spell’s level (rounded down).
Deathly Touch (Ghostly Only). Melee Weapon Attack: your spell attack modifier to hit, reach 5 ft., one creature. Hit: 1d8 + 3 + the spell’s level necrotic damage, and the creature must succeed on a Wisdom saving throw against your spell save DC or be frightened of the undead until the end of the target’s next turn.
Grave Bolt (Skeletal Only). Ranged Spell Attack: your spell attack modifier to hit, range 150 ft., one target. Hit: 2d4 + 3 + the spell’s level necrotic damage.
Rotting Claw (Putrid Only). Melee Weapon Attack: your spell attack modifier to hit, reach 5 ft., one target. Hit: 1d6 + 3 + the spell’s level slashing damage. If the target is poisoned, it must succeed on a Constitution saving throw against your spell save DC or be paralyzed until the end of its next turn.