Your best best bet to understand Amazon algorithms is to read Let's Get Visible by David Gaughran. Ranking works on sales...but sort of of like this: The number of units sold yesterday has a half-life today...a book has to keep selling to hold a rank or move up in rank. That's all I know and I may not be on target. If you want to know how your book ranks day-to-day track it in https://tracker.kindlenationdaily.com/. It's free and provides graphs and if interested, the sales and price history of a book from the day it is published.
A book sale spikes your rank. Then it hangs there for a while (maybe 2 hours?) before exponentially decaying. Each time you get a sale or KU borrow, it shoots up X amount according to an exponential chart and hangs then glides. So if you never sold a book before, 1 sale shoots you to 300k. A second sale would shoot you to 100k. A third sale to 80k. The whole graph looks something like this: