Adding Dependencies allows you to access hooks, tools and apis provided by other mods. Depending on other's code allows you to spend lesser time on writing your code, and more time on refining it. A commonly used dependency in fabric is Fabric API.
Open your build.gradle
file and add the required maven repositories
repositories {
maven {
name = "Example"