At some point God made a law that the Hebrews were supposed to slaughter and burn a red heifer in an elaborate ritual to get ashes for the bitter water.
God’s rule about touching dead people is that whoever touches one is unclean for seven days and must ritually clean on the third and seventh days. If they don’t, they should be banished.
The tent that the person died in and everything in it is also unclean for seven days. To cleanse it, a clean person needs to dip hyssop in bitter water and sprinkle it on everything on the third and seventh days.