This document is an up-to-date guide on compile Emacs 31 on windows with MSYS2, and make a installation with native compile that can work without MSYS2.
The idea is after get a working Emacs, you may delete MSYS2 environment to save some disk space, and forget about rebuilding Emacs until the next time you feel need to, without need figuring out everything again.