Exodus 30:12

Amplified Bible (AMP)
“When you take the census of the Israelites, each one shall give a ransom for himself to the Lord when you count them, so that no plague will come on them when you number them.

Read Exodus 30:12 in other translations