I haven't looked at the Kindle app. You'll probably find it easier to go to the site and see what tools they have there that can list your books.
For Apple's Books app, you can use Shortcuts. If you don't have the Shortcuts app, you'll need to download it from the App Store. It's free.
I did a little experimenting and came up with the following shortcut.
It saves a list of titles and authors to a note, then opens the note for you. You can tweak it in the text step to add more information, and do some basic formating. I have over 500 books, and it took a couple of minutes to run on my M2 iPad Pro. So, this s pretty slow for very large collections.
Also, I can't guarantee all books are in the lists. I added a number to the list, so you have a rough idea if they are all there, but the order is a bit different than what you get in library view in Books, so it's hard to be sure. The numbers in my Library Lists view don't match. The list is longer. I think that's because series are counted once in that view.
Good luck.
View attachment 104410