Mac Notes App Sync Containers Having Mac Applications
Somehow icloud had backup data of old notes plus apps. So after backing my current notes, I deleted the backed up data from icloud. After resyncing the notes, the problem was fixed.