Does hernia cause penis to be small?

Maybe. If the hernia is in the scrotum than it can give the appearance of micropenis due to the larger size of the scrotum. By itself, the hernia will not make the penis smaller.