Do you think that I could greatly reduce my risk of HIV if I take a shower after unprotected sex or eat garlic?

No! That is a complete myth and you are putting yourself at great risk. If someone said that to you, tell them they are extremely irresponsible. If you got HIV during unprotected sex, taking a shower isn't going to wash anything off - it's inside you and already infected you. Eating garlic? How does that work. The best thing is to use protection and know your partner's history before sex.