I will give some hints for installing MAME on a Raspberry Pi 4.
Keep in mind that MAME requires a lot of performance from the CPU. As shown in the Requirements section, you will need at least a Raspberry Pi 4.
Running MAME
MAME is dynamically linked against some libraries which may not be installed on your machine.
The following commands have been tested on a fresh installation. After installing, you should be able to run MAME. (Please report if you find a different situation.)
Raspberry Pi OS
Debian version 11 (bullseye)
sudo apt install libsdl2-ttf-2.0-0
more to follow