I think Java interpreted it wrong, as it requires a 4 digit year.
Maybe try - YearMonth.of(2024, 12) Let me know if that works...