Minecraft wiki entry for Creating_Forge_mods, associated text: create a GitHub account to manage versions of your mod and collaborate with other developers.
further tutorials (in video form, for version 1.15.2)
text tutorials for 1.16.5, 1.17.1, and 1.18.2