Is there a reason why I am not able to urinate ever since I had hernia surgery?

Lazy bladder. Often the bladder becomes lazy from anesthesia. It gets back to normal within 24 hrs for most people. If u get uncomfortable especially pressure above pubic bone, u may have to go to ur surgeon, pcp or er to get the bladder decompressed. If not uncomfortable, drink more fluids as it will help u make more urine. If it has been going on for a while, u will need to a urologist.
Contact. Your surgeon. I do not know what type of hernia surgery you had. Rarely a urinary catheter is needed temporarily after surgery. See your surgeon who would have much more detailed information.