setLoginItemSettings
Set the app's login item settings.
To work with Electron's autoUpdater on Windows, which uses Squirrel, you'll want to set the launch path to your executable's name but a directory up, which is a stub application automatically generated by Squirrel which will automatically launch the latest version.
For more information about setting different services as login items on macOS 13 and up, see SMAppService.