@eris@Ukko on the first few months of aging cheese it does get moldy, it's just washed with brine to kill the mold
after a while it hardens enough that mold doesn't develop anymore tho
and there are cheeses (like real parmesan, from italy) that have special bacteria that prevents mold