All of the above mentioned injuries that are exposed to dust, soil, or animal excrement are more likely to develop tetanus. In addition, deep penetrating wounds, such as stepping on a rusty or dirty nail, can also cause tetanus. However, it's very unlikely that you'll get tetanus from a rusty razor. Because rust isn't the cause of tetanus, but C.
Rusty nails are usually found outside in the soil, so they're more likely to be contaminated with C. Tetani bacteria than with a rusty razor, which is usually kept inside. The chance of contracting tetanus from a rusty razor is very low if maintained hygienically. Tetanus comes from bacteria that are often found in soil.
It doesn't really have anything to do with rust, but things that are rusty are usually outside and are good at trapping dirt. Puncture wounds pose the greatest risk because the bacteria that cause tetanus are anaerobic (oxygen kills them). First, tetanus is a bacterial infection that can be contracted anywhere, with that bacteria in the soil to remove dust or body fluids. You don't need to come into contact with an animal.
That's why rust is a great thing to take a picture of.