As a professional writer, with 125 titles published, can I just say, you can use either Amazon (KDP) or IngramSpark to produce your Print-on-demand or eBooks. But do sign up to Reedsy to get them properly edited and proofread first.
The hardest part, as with any book, is that people have to know they exist before they buy them. So, publicity and marketing are crucial (You can get professionals on Reedsy to do those things for you too).
If you want to try the traditional route, an agent is helpful but not essential. They will take 15%, as has been mentioned above. It's the publisher, not the agent, who offers an advance and that money has to be earned out before royalties come to you. This is not the case with self-publishing.
I suggest you buy A & C Black's The Writers and Artists Yearbook, which is updated every year in August. (They do one for children's books too) This is a terrible time in the publishing industry, especially because our books have been "scraped" to train AI in America.
My advice is to treat the job professionally, i.e. get your work properly edited and proofread, and not give up your day job. Good luck!