Go to the settings in Firefox and scroll down to “Performance” and make sure the box labelled “Use hardware acceleration when available” is ticked, to start with.
What kind of computer do you have? If it’s not very powerful (like a Chromebook or other low-cost laptop), that may be why it’s struggling.