Notes, Drive and Keychain not syncing to iCloud from Mojave
The Notes application for macOS has been very unreliable throughout MANY macOS's so including Mojave! Even in the time it was still written as Mac OS X. So even if you cure your Mac, which you could do and I explained in https://discussions.apple.com/thread/251096810 it will most likely be temporary and at some point in time you will notice that the continuous spinning wheel in Notes will get back to nag you. And the non-syncing will be back again.

A better way is to start using Notes through the web interface, on www.icloud.com directly, and bookmark Notes for direct access.
Its interface is smooth and complete and will allow flawless syncing with all your other devices like you iPhone and iPad where you leave Notes on.

Notes on iOS and nowadays also iPadOS however is pretty stable. So if you you these in combination with the Notes web application through the icloud.com website your are fine.