Before we begin, you should make sure you are using the latest version of Loom and Legacy Looming. At the time this was written, it is 1.15.
If the version in your workspace is older, it is recommended to upgrade to the latest one. However, this might require upgrading other parts of the tooling, such as Gradle, to get it working.
To avoid most issues, you can rely on the example mod repo as a recommended workspace setup.