Find the app your looking for:
sudo find / -type f -iname "*myapp*"
Edit the file:
nvim /usr/share/applications/org.myapp.MyApp.desktop
You’ll want to look for the Exec key, and prepend the env vars to the app command:
Exec=env MY_ENV_VAR=hello my-app-cmd %U