With only native Blocks an animated gif can only be used in the WebViewer. See Taifun's recommendation (https://puravidaapps.com/snippets.php#2ani ) to show the gif usin a WebVIewer.
or use an extension ... here is Juan Antonio's gif extension Create Gif animated. Extension
or perhaps you want to produce a marquee? How to make a marquee: https://groups.google.com/g/app-inventor-developers-library/c/rzC0mHeXSjw/m/H2QnbUEKPIEJ
Regards,
Steve