June. I’ve faced that problem a few times now, and can only conclude Sparklykid is right. Animals DO understand death, differently from us, maybe better than us. (Have you ever seen an elephant, distraught and howling at the death of her young?)
Hold your pet gently, speak soft words of love, and let the survivor look at their pal’s body.
And once you are alone with the last one, assume they remember and miss their friend. “Animals don’t remember.” Nonsense.
Animals DO remember, and grieve. All you can do is offer love.
With respect,
BillB