How it works is by using a command to give a normal spawn egg and modifying it using the "EntityTag" tag.
start by typing a /give @p <insert spawn egg you want as ur icon>
remember to replace the area with the <insert spawn egg you want as ur icon> with a actual spawn egg.
now add this:
(this is optional) {display:{Name:'{"text":"<text>","italic":false,"bold":true,"color":"<color>"}'}
,EntityTag:{id:"<insert entity>",CustomName:""}
enter a entity name at <insert entity>
now it should look something like this(not exactly though)
/give @p cat_spawn_egg
{display:{Name:'{"text":"tnt spawn egg","italic":false,"bold":true,"color":"red"}'}
EntityTag:{id:" minecraft:tnt",CustomName:""}
enjoy!