It is true that deep penetrating wounds, such as stepping on a rusty or dirty nail, can cause tetanus. However, it is very unlikely that you will get tetanus from a rusty razor. This is because the bacteria that causes tetanus, C. Tetani, is usually found in soil and not in the razor itself.
The chance of contracting tetanus from a rusty razor is very low if it is kept clean and hygienic. Rusty nails are usually found outside in the soil, so they are more likely to be contaminated with C. Tetani bacteria than with a rusty razor, which is usually kept inside. Puncture wounds pose the greatest risk because the bacteria that cause tetanus are anaerobic (oxygen kills them).
It is important to remember that tetanus can be contracted anywhere, with the bacteria in the soil to remove dust or body fluids. You don't need to come into contact with an animal for this to happen. That's why it is important to take precautions when dealing with any kind of wound, even if it doesn't seem like it could be infected. To prevent tetanus, it is important to keep up-to-date with your vaccinations and to practice good hygiene when dealing with any kind of wound.
It is also important to be aware of your surroundings and to take extra precautions when dealing with rusty objects or objects that may have been exposed to dirt or animal excrement.