I think encryption of local files is a bit off-topic to the Obsidian forum. I think you would need to focus on 3rd-party solutions for that. Unless, perhaps there is a plugin that encrypts local files. Have you searched the plugin directory for ‘encryption’?
I believe Windows 10 has an option to encrypt a hard drive. Other operating systems may have similar options.
Obsidian Sync encrypts the files on its servers, but it doesn’t do anything to your local files.