Anal sex cause infection?

Is switching from the ass to the vagina bad like should it always be avoided or is it just risky ? Like I see pornstars switch holes the whole session.

But I feel an infection coming on?

Google isn’t very helpful so can someone pls leave me advice or share their experience?

Also leave all the stupid judgy comments to yourself please.

Edit: before I posted this I switched holes.

….I now have an infection.