Text on a LED matrix is not scrolling in order.

(deleted)

How are the 4 LED matrices wired ?
Where did you get the code from ?

(deleted)

So all of the pins are common to all of the displays and there is no separate pin on each of them ?

Please provide a link to where you bought them

You need to set the correct hardware. Read the MD_MAX72xx library documentation and change this to your hardware type.

#define HARDWARE_TYPE MD_MAX72XX::FC16_HW

If you don't know which one, try each in turn. Make sure you put the DATA IN on the right hand side of the display.