You replace stone with coal ore or iron ore, but you have to do it like this:
For coal ore, it's the same thing just copy paste stone to execute console command then replace it with "coal ore"
on mine:
if event-block is stone: # the even block here Ex: wheat
chance of 10%:
execute console command "# Do the stuff here"
if event-block is iron ore:
chance of 10%:
execute console command "# Do the stuff here"