Random FPS drops in Minecraft

https://preview.redd.it/4kjyofqw9emd1.png?width=2560&format=png&auto=webp&s=da2aca73b0bef29b6317c706296dd3984ec7ceb4

Hi I have recently been getting random FPS drops in Minecraft. (See the purple chart) The screen basically freezes for a split second every now and then, but the freeze rate seems to be pretty uniform for some reason. I am playing on an MBA M1 512GB 8GB RAM (I know 8gb ram but before you guys say anything it used to run Minecraft perfectly well at 60fps at a higher render distance, sometimes even with teams calls and other heavier multitasking simultaneously. This weird occurrence is recent, and occurs even if I use fabric loader, optifine or sodium (and of course normally too). How do I fix this?