Keep inventory for 1 item

im new to creating data packs, im in 1.21.1 I want to make it so on death you keep 1 specific item and the rest fall onto the ground like normal, how?
Continue to help post