A man has allegedly sexually assaulted a nine-year-old girl on two occasions in the NSW Illawarra region, prompting his arrest.