Date is wrong by months when set to automatically
Excellent question. There is a lot that you can do to inspect this process.

How can I tell if my Mac is keeping the clock updated properly?

Some things to point out:

Check which time servers you have selected
Change them and retest
If you have a VPN, try that and be sure you try without
Look over your time zone (set it if it’s not correct while you sort out the time servers

Some computer is telling yours the wrong time, so think about networks and then dig into the command line tools if needed.