This is a very good question because shutting down Ubuntu 22.04 is a multi step process that I find very annoying.
Here is my solution for shutting down Ubuntu 22.04 running Gnome desktop in one mouse click. You can also use this method to create launchers for any bash script you would like to launch from your Dash, Activities or Desktop.
mkdir /home/$USER/shutdown
(creates a folder called shutdown in home)
nano /home/$USER/shutdown/shutdown.sh
(creates a bash script in /shutdown)
Add the following to shutdown.sh
#! /bin/bash
shutdown now
and save shutdown.sh (in nano ctrl-o, enter, ctrl-x)
#! /bin/bash
identifies the file as a bash script.
shutdown now
is the bash command to shut down and "now" means now, not later.
chmod 775 /home/$USER/shutdown/shutdown.sh
(sets shutdown.sh permission to -rwxrwxr-x)
nano /home/$USER/.local/share/applications/shutdown.desktop
(creates a .desktop file in /applications)
Add the following to shutdown.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/$USER/shutdown/shutdown.sh
StartupNotify=false
Name=Shutdown
Icon=/home/$USER/shutdown/shutdown.png
and save shutdown.desktop (in nano ctrl-o, enter, ctrl-x). Exec=
sets the path to the bash script containing the command to shutdown. Name=
sets the name of the command as found in Activities. Icon=
sets the path to the icon.
chmod 775 /home/$USER/shutdown/shutdown.desktop
(sets shutdown.desktop permission to -rwxrwxr-x)
Save a suitable shutdown icon to /home/$USER/shutdown such as the following:

be sure to name the icon file identical to that given in Icon=
statement in the .desktop file. In this example the icon file is shutdown.png.
There are three ways you may now launch shutdown.sh
a. Press the Super key, type shutdown and then select the shutdown icon.
b. Press the Super key, type shutdown, right click the shutdown icon and select "Add to Favorites" to place the shutdown icon on the dash.
c. Copy the shutdown.desktop file to your desktop, right click and select "Allow Launching".
This is a rather lengthy explanation but it serves to demonstrate how to properly link a bash script to a graphical launcher. A bash script can perform many useful task such as executing system commands, mounting drives, performing backups or launching applications. The sky is the limit.