One of the writing sites I follow had a question from a new writer who hasn’t finished his first book but had questions on putting that book out as self-published. Here is my reply.
First and foremost, write the dang book.
Second, edit the dang book yourself.
Third, get decent beta readers or a critique group who like your genre and listen to their comments. If more than one notes the same problem, rewrite accordingly. Otherwise, if the advice feels right to you, follow it. If none of the advice feels right, you need to rethink your attitude toward your writing. Arrogance has never produced good books.
Fourth, hire a good content editor to help you fix your book, then a good copy editor to fix those typos and grammar problems. Pay attention to what they do and learn from it so you won’t make those mistakes again.
Finally, seek advice on self-publishing. A few early resources are linked below as well as info on critique groups and beta readers.
A few things not included in these steps. The writing craft is learned in the same way as the skills needed to play a sport. You will not produce a great book without those skills any more than someone who has never played basketball can become an instant professional. Practice your skills, and find good teachers to help you. It will be worth it in the long run.
Also realize that very few writers produce a salable book the first time. Most are dreck, and the first book you put on the market will define your career, particularly if it is the first book in a series. Your other books may be much better, but, if that first piece is dreck, it will prove costly because readers won't read them.
CRITIQUE AND BETA READER QUESTIONS:
http://mbyerly.blogspot.com/search/label/critiquing
JANE FRIEDMAN INFO ON SELF-PUBLISHING (Friedman was in traditional publishing for many years and has worked at various writing magazine. So, a good resource.)
https://www.janefriedman.com/self-publish-your-book/
AUTHOR BUSINESS BASICS, NOT SPECIFIC TO SELF-PUBLISHING:
https://elizabethspanncraig.com/category/business-of-writing/