I wrote a book, now what?

Getting an idea from head to paper/screen is the biggest hurdle in the writing game. If you've done that, then you're well on your way to having a book to show for it. Well done, you. Just remember, a first draft is NOT what should be sent to an editor. That would be a waste of time and money. The web is full of grammar and editing help sites.  Find a process that works for you and get that draft cleaned up until it represents the best of your abilities. Use beta readers, critique partners, whoever can remain neutral and honest with you about what they're reading. Make that manuscript shine.
To assist my clients with the self-editing process, I provide a checklist with some general advice and also custom items on the list that pertain to an author's specific quirks and habits. And I have seen an improvement in quality from authors who use the checklists. Do what works for you, but find ways to improve your craft. Ernest Hemingway said, "We are all apprentices in a craft where no one ever becomes a master." As apprentices, we should constantly be learning and growing in our skills.

Once that manuscript is all shiny and you have an editor and contract in place, sit back and be open to changes and corrections. At the same time, don't beat yourself up over an editor's comments. Remember, an editor makes suggested changes. It's up to you -the author- to agree and make changes accordingly. Ultimately, it's your work. That's why it is so important to find an editor whose style meshes with yours. A good editor wants to improve the quality of a piece of writing and help build a writer up, not tear a writer to bits and trash their work.
I choose to work with authors in the genres I enjoy reading. This makes my work enjoyable while also giving me an insight into the market. This allows me to have better advice and points of reference to support my suggestions. So, again, choose an editor that believes in you and what you're trying to produce.

Once you have a work ready to publish, you'll need a cover and formatting for the method/platforms in which you choose to publish. Think of this as the packaging. Don't skimp. Covers can sometimes make or break a book's success. And formatting is not just for the technical part of "making" a book. It's also about how pretty or original you decide to make your chapter headings and the extra bits.
As for the next part of "how to make a book", I'm not gonna go there. I'm not an expert by any means. I like to read and revise books. Selling them is out of my league. I imagine the same kind advice applies, though. Do your research, remember it's your work, and keep on learning.