I love LICEcap. I would use the built in video capture from macOS, but LICEcap produces files that are much smaller.
The quality isn't as good, but most gifs I am producing are meant to be viewed in slack or iMessage where the quality is not super important.