Even you check the box of enable on my Mac account in notes preferences , a folder is created on my section having zero data stored in it , however notes in iCloud are enabled they will never sync with on my Mac notes .
Because on my section is personal folder to save notes in notes application of mac and it's not connected to syncing of iCloud notes .
see the article Change preferences in Notes on Mac - Apple Support
notes stored on your Mac
You can store notes on your Mac instead of in an online account (such as your iCloud account). If you store notes on your Mac, they aren’t available on any of your other devices.
Notes stored on your Mac appear under On My Mac in the sidebar. If you don’t see On My Mac in the sidebar, you can enable it.
Choose Notes > Preferences, then select the “Enable the On My Mac account” checkbox.
Note: If you later disable the On My Mac account, notes in your other accounts (such as iCloud) are not affected.