Minecraft wiki entry for execute, associated text: To summon lightning bolts at the positions of every zombie:
execute @e[type=zombie] ~ ~ ~ summon lightning_bolt
To summon lightning bolts at the positions of every zombie standing on any type of sand:
execute as @e[type=zombie] at @s if block ~ ~-1 ~ minecraft:sand run summon lightning_bolt
To summon 10 creepers at the nearest player's position (only works as long as there are at least 10 entities in the loaded world):
execute @e[c=10] ~ ~ ~ execute @p ~ ~ ~ summon creeper ~ ~ ~
To summon ender dragon at the position of another player:
execute @a[name=name_of_player] ~ ~ ~ summon ender_dragon