OCD urges

I understand how we can not answer an urge to drink or eat as these actions are not always necessary.

However, how do we not answer an urge that feels tied to safety or not spreading germs? In other words, yesterday I visited someone in the hospital. My purse got moved by someone to the floor. My mind immediately, despite seeing what appeared that be a clean floor, went to, “Hospitals are full of germs, especially the floors.” I answered the urge at home to disinfect the outside of my purse and to wash my jacket, since the purse touched my jacket. And to wash my hands. Answering these kinds of urges (and thus is just a small example) can be exhausting, but my brain gives me lots of reasons why it’s necessary. Sometimes I allow these things to take up lots of time.

Suggestions? Thank you in advance!