If you are using Gnome 46 and Ubuntu 24.04, here we go:-
Place the icon you wish to use in /usr/share/icons (sudo privileges required)
Then you have to find and select the application where you wish to change the icon
Example herewith for GIMP
I downloaded an icon from the internet and renamed it as gimp.png
Then, I moved gimp.png to usr/share/icons
Navigate via terminal to /usr/share/applications
Code:
cd /usr/share/applications
Code:
sudo nano gimp.desktop
Navigate to the line Icon=gimp
Change to Icon=/usr/share/icons/gimp.png
Ctrl O to save
Ctrl X to exit
Log out and log in