Spigot addressed this concern and said following:
As of 1.18+, the main spigot.jar is now a bootstrap jar which contains all libraries. You cannot directly depend on this jar. You should depend on Spigot/Spigot-API/target/spigot-api--SNAPSHOT-shaded.jar, or the entire contents of the bundler directory from your server, or use a dependency manager such as Maven or Gradle to handle this automatically.
Now, i am fully aware that he is running version 1.17, so it might be something else but this is important since most people wont think about reading that section.
you can find that quote from their Buildtools Frequently asked questions part. BuildTools