Choose Notes > Settings.
Click the “Sort notes by” pop-up menu, then choose an option.
The option you choose applies to notes in all folders and all accounts that use the default sort setting.
The “All [account]” and Recently Deleted folders always follow the default sort option.
Go to the Notes app on your Mac.
Select one or more notes, then choose File > Pin Note.
You can also swipe right on the note (in the list of notes) using two fingers on the trackpad (use one finger on a Magic Mouse), then click Use Smart Folders in Notes on Mac