If you search for kindlegen the first page that shows up is this, and the binary for macOS is 32-bit only, which cannot run on versions of macOS that have completely removed 32-bit support.

Thankfully there is a 64-bit version of kindlegen bundled with Kindle Previewer, available here. After installation, just right-click on Kindle Previewer and Show Package Contents.