PIONEER HEAD UNIT HARNESS DIAGRAM
The Mazda NB OEM Audio System FAQ - Miata
The actual design of the head unit is apparently farmed out to traditional audio companies like Pioneer and Alpine, but the manufacturing is done by FMS or Panasonic/Matsushita. Units with a faceplate number beginning with "1" were made by Panasonic, while those beginning with "4" were made by FMS.
Amazon: EKAT Single Din Car Stereo with Carplay 9 Inch
Make sure this fits by entering your model number. ★Car stereo with Carplay:The main head element has a built-in D-Play system, which supports connection with Apple mobile phones, and can access mobile phone address book, email, notification, map navigation, music, video and other information, and realize voice control.