Categories: the key is bringing a #1 bestseller.
The easiest way to do that is to hit a category with low sales numbers. For example, with one of my books, the “Christian quotations” category only needed 5 book sales to #1. So, I knew I could sell at least five books to reach that number mark. When your book becomes a #1 bestseller, it gets pushed out a bunch of different ways by Amazon increasing visibility and sales making it a solid #1.
Keywords: create organic sales.
This helps keep you at the top over time. It also helps for consistent sales and increasing launch day visibility. For another one of my books, having a targeted keyword that gets 10,000 searches a month helped me launch and helps me sell 5 to 10 books on average since launch (not counting the first week with huge launch numbers).
I hope this helps make more sense. This is all based off of Amazon KDP. It can work similarly with other distribution avenues, but the bulk of my success comes from Amazon.