Basic Rules, pg. 245
Gentle Repose
2-level
Necromancy
(ritual)
Casting Time 1 Action
Range Touch
Duration 10 Days
Components V, S, M
Materials A pinch of salt and one copper piece placed on each of the corpse's eyes, which must remain there for the duration.
Damage Type: Warding
Attack/Save Throw: None
Description: You touch a corpse or other remains. For the duration, the target is protected from decay and can't become undead.
The spell also effectively extends the time limit on raising the target from the dead, since days spent under the influence of this spell don't count against the time limit of spells such as raise dead.
Class(es): Cleric, Wizard