When Israel took a census, each man was to offer a ransom payment for the atonement of his soul.
GOD instructed Moses to have all Israelite men give a ransom payment for themselves at each census.
11 Then the Lord spoke to Moses, saying, 12 “When you take the census of the children of Israel for their number, then every man shall give a ransom for his soul to the Lord, so there may be no plague among them when you number them. 13 This is what everyone among those who are numbered shall give: half a drachma according to the drachma of the sanctuary (a drachma is twenty obols). The half-drachma shall be an offering to the Lord. 14 Everyone included among those who are numbered, from twenty years old and above, shall give an offering to the Lord. 15 The rich shall not give more and the poor shall not give less than half a drachma when you give an offering to the Lord to make atonement for your souls. 16 You shall take the money of the offering of the children of Israel and shall give it for the service of the tabernacle of testimony, that it may be a memorial for the children of Israel before the Lord to make atonement for your souls.”
(Exodus 30:11-16 OSB)
A ransom is a payment made in exchange for something that has been taken captive. The Israelite men—as is true of all people—were taken captive by sin. GOD had chosen Israel as His special people and desired this financial contribution as a monetary sacrifice to remind Israel of their status as redeemed from Egyptian slavery, and eventually, their redemption from sin. The penalty for not collecting this ransom payment with a census was a plague breaking out among the people.
The census ransom payment is a shadow of a permanent ransom payment that was yet to come.