My husband needs hernia surgery. Can this cause infertility since we are trying to conceive?

Highly unlikely. There is no direct connection between infertility and inguinal hernias, although these two are sometimes associated. Ironically, there is a small but defined risk of infertility associated with hernia repairs due to trauma to the tube that carries sperm.
Depends. It depends on the type of hernia he has and any complications from that. In general hernias do not affect fertility but it could be possible if he has a complex hernia.