Why can't this LM324 op amp reproduce a signal above a certain frequency?
It seems like you are running into Slew Rate Limitations, and your output is presenting what is called 'Slew-Induced Distortion' - the Op-Amp's Output Swing is limited by the Slew Rate, so as frequency increases the limit for maximum output swing without 'Slew-Induced Distortion' decreases - typically Op Amps Datasheet have an 'Output Swing vs Frequency' plot.
Have a take a look at Figure 6 of the LM324 Datasheet, and where your signal is in the plot according to the scope captures you shared (see below). Ideally you'd want to stay "under the curve".
If you want to learn more about Slew Rate take a look at the 'Slew Rate' series in the Precision Labs for Op Amps training.
The LM324 is an old and slow OPA. It has limited "slew rate", no more than 0.5 V/us, which doesn't allow to follow large amplitude signal changes faster than 1 MHz, as you found this in your own experiment.
There is nothing you can do to improve the slew rate. You need to procure a faster operational amplifier.
Try this datasheet instead.
Refer to Table 6.8 - Operating Conditions on page 7.
The 1st parameter in the table is the "Slew rate at unity gain".
This tells you how fast the opamp's output can move, and for this LM324 it's 0.5V/μs - and that's with almost no load (1MΩ || 30pF).
From your scope measurements it looks like you're seeing about 0.2 to 0.25V/μs - not entirely unreasonable with a load.