There’s no inflight access to a cargo hold or cooler. Nor any concern for body preservation. Even on a long-haul flight they’ll arrive at destination before decomposition becomes an issue.
If there’s enough unoccupied seats, move the body to a row by itself, reshuffling passengers away from the area if necessary. Then seat-belt it in place, & cover it with a blanket. If the flight is full it can be moved to a lavatory & locked in there. For a full flight it’s simpler though to just move it to the window seat in the row where it is, then find 1 or two people who don’t mind sitting next to a very much non-talkative passenger. The lav is very much a last-ditch plan.
Eons ago I had one death aboard which occurred at the gate during boarding. Ancient lady had been pre-boarded in first class. Later during main boarding she let out a gurgle and collapsed onto the unrelated person sitting next to her, never to move again under her own power. Boarding stopped, paramedics summoned, yada yada. 90 minutes later with the body removed and any mess cleaned up, we recommenced boarding and launched with one fewer passenger than expected.
So on that score I’m just a little bit pregnant.
Aren’t you glad you asked.