Updated 08082022-125512
There are many other, very impressive shortcuts available on RoutineHub and across the web which use Apple APIs to retrieve App Icons (and a whole bunch of other "marketing" media files,) but frankly, I'm personally far more likely to simply be looking to download an app's icon in the highest possible quality, ideally in png format, making all of their menu options unnecessary and tedious.
I created this shortcut for myself as the fastest means of saving "original" quality png files of app icons, most often via the Share Sheet from the App Store app. It saves said files in two locations, both of which you will be asked to specify at install: a folder in Files and an iCloud Photos album.