There were a few programs that could do it, sadly none I know of are compatible with Win10.
Even my (free) version of PSP doesn't work well with Win10.
There are a few online ones. E.G. EZGIF.com
Easeus also has a program, but I'm not sure if it is still freeware.
https://www.easeus.com/video-editing...f-or-gifs.html