FileVault is Apple’s implementation of encrypting your data on macOS and Mac hardware. It will encrypt all of your data on your startup disk (although you can also encrypt your Time Machine backups as well) and once enabled, it will encrypt your data on the fly and will work seamlessly in the background.
FileVault has come a long way since I used it, but I haven’t enabled it in years.