There is no one true way that a book will be rendered. Amazon supports multiple Kindle formats (mainly MOBI7, KF8, and KFX) and there are significant differences in how these are rendered. There are also differences between renderers for the same format across different apps and devices.
See the
Amazon Kindle Publishing Guidelines for information about what HTML/CSS is supported. Use of unsupported features is more likely to result in a book that renders inconsistently.
If you are producing a book for personal reading on your own devices then I suggest making it look good there and not worrying about how the Kindle Previewer shows it. If you are instead producing a book for sale on Amazon then you are taking a wrong approach by editing an AZW3 file. Amazon does not accept that format from publishers.
Publishers mostly provide either EPUB or DOCX to Amazon and Amazon then produces the various Kindle formats from that. For books with simple formatting the results shown by the Kindle Previewer are pretty close to what readers with newer Kindle devices will see. Professional e-book formatters will also test the book in a variety of formats using multiple devices/apps to get at least an acceptable quality of rendering on all of them.