Board overheated and popped (rip) once the motor stalled. Not sure why

Using an Arudino Every

Mosfet in question is this: https://www.digikey.com/en/products/detail/infineon-technologies/IRLB3034PBF/2096638

Was referring to this guide: How to Make an Airsoft Mosfet - YouTube

Everything works, or worked, perfectly until the motor stalled when it was under too much load. The atmega chip popped and smoked shortly after, I think that it's because of the shared ground getting flooded by a huge amount of current when the motor is stalled, but I don't really know what I'm doing or how to fix that if that's actually the case. Any help or things to point me towards are greatly appreciated

You need a kickback diode across the motor, there is a built in diode already in the transistor, but it does not protect it in your configuration.

The atmega chip popped and smoked shortly after

The MOSFET was destroyed and then, ~11V was fed through the MOSFET gate to the digital pin, destroying the processor chip.

An inductive kick diode across the motor terminals is required, as shown above. The gate resistors are also required.

Was referring to this guide

Sad. In the future, avoid it, and anything similar.

You could also add a diode in series with the gate connection to prevent further issues should the FET fail again .

You seem to be lacking a fuse - that battery can easily source 100's of amps(*) if there's a
short-circuit - you need a fuse to prevent the wiring and/or battery catching fire in that eventuality.

The 20C rating means it can continuously provide 22A without much effort, so will be able to
source much more if not limited to that value.

A 25A automotive fuse (you can get inline fuse holders) is a cheap and simple way to protect
your circuit (check the wiring to the motor is rated 25A or more too, of course!)