Go to Menu > Git > GitHub > Share Project On GitHub, disable Private and Share, this should create a Git repo for you.
If you ever need to update your mod click the "Commit" button on the left, select all changes, write a message and press "Commit and Push".
First we need to package our mod, in Intellij click on the gradle icon (the elephant) on the left of your screen and double click build to create a jar containing all your work.
Go to Modrinth and click the + in the top left (sign in if you haven't already) and create a new project. Modrinth already guides you through the process, but watch out for these common pitfalls to prevent getting your mod rejected: