I think your question is answered on these very forums, here: Setting up Retropie - in need of some help please
But since (as I admit in that very thread) I’ve very limited knowledge here, I could be wrong.
Looks like MAME needs to be configured separately, which includes setting up “Insert Coin”, etc.