i made about 20 of these for a client over 10 yrs ago when they were still called "animations", old-fashioned, i know.
I created them using Adobe After Effects by masking out the moving sections and laying them over a still-frame background with a bit of feathering. its not difficult, but it can be a bit tedious depending on the content.
I'm sure there is some new-fangled software that makes it much easier nowadays using multiple stills and bracketing. in my day we did it by hand, pixel by pixel, uphill! both ways!! GET OFF MY LAWN!
but i digress...
Tony