Signing your application
Desktop
On Windows
You can submit your final executable for malware analysis, provided you have enough users (about a hundred or more) this should be enough to remove the Windows SmartScreen protection entirely free of charge.
Otherwise, you will need to buy a certificate from Microsoft.
On macOS
For distribution on the App Store, you must subscribe to Apple Developer Account.
Otherwise, to distribute it online, you need to sign the application.
On Linux
You don't need to do anything.
Mobile
On Android
Verification is done by submitting the application to the Google Play Store. Distributing APKs in any other way will by default be untrusted and require additional user manipulation (overriding Play Protect) to install.
On iOS
Subscribe to Apple Developer Account