The thing is that I want to create my own spring-boot starter and
include it as a maven dependency in the pom.xml file of my project.
By reading this I think that what you are looking for is how to create a dependency, that you can easily include it at any of your projects.
By this you can have a local maven repository or push it to a remote repository (like most of all dependencies), what is important is wherever you push it is available to be downloaded.
If you go by the local version you can use a maven/gradle plugin to package your jar and publish it. You will need to specify a couple of properties like groupId, artifactId and version
https://docs.gradle.org/current/userguide/publishing_maven.html
with the groupId, artifactId and version you will be able to include it in your project like
<dependency>
<groupId>org.myorg</groupId>
<artifactId>my-artifact</artifactId>
<version>0.0.1</version>
</dependency>
if this is from a maven local dependency don't forget to include maven local as part of your repositories.
https://www.baeldung.com/maven-local-repository
Check these articles, it will help you.
https://maven.apache.org/guides/introduction/introduction-to-repositories.html
Create local maven repository