I was a very long time I didn't need to created a animated gif...
I had a program before to take a static images (.jpg, .png etc..) and convert then into an animated gif..
All the web search engine push for online (aka SaaSS) tool 🤮
If you're going for a command-line tool, ImageMagick and FFMPEG can both do this. Or, if you're more interested in something more GUI-based, GIMP will do this.
This page talks about how to do that with ImageMagick, this Stackoverflow question has a lot of good examples how to do this with FFMPEG, and here is a page that deals with doing so in GIMP.