Our local library makes it pretty easy. Ours works through an app called Libby that connects with my library card and I then download books to the kindle.
I also recommend Libby. It used to be Cloud Library with our public library but they phased out of it and it’s Libby now. I like it much better. They also have audiobooks.