Here is small guide/ code sample. I hope it helps.
First, specify the file name, like : my_app.desktop
The following code goes into the file:
[Desktop Entry]
Type=Application
Name=my_app
Comment=(what the app does)
Icon=/…/…/my_app.png (full path or generic name, like : firefox)
Exec=command to run the app (or full path)
Categories=Utility;
The file can go in this directory : /home/…/.local/share/applications