Sharing a short recording as a link means putting it on a page and sending the address, with a caption saying what to look at.
The first decision is the format, and it is not the one the filename suggests.

This guide covers why GIF is the wrong format, making a video behave like one, keeping the file small, and what to offer alongside.
GIF is expensive for exactly this case
The format dates from 1987. It stores each frame as an indexed image limited to 256 colours, with only minimal compression between frames.
A screen recording is mostly unchanging: a window, a page, a cursor moving. Modern video codecs are built to encode that almost for free, because they describe what changed rather than each whole frame. GIF cannot, so it pays full price for every frame.
| Ten seconds of screen recording | Typical size | Colour |
|---|---|---|
| GIF, 15 fps | 8-15 MB | 256 colours, visible banding |
| MP4, H.264 | 200-500 KB | Full colour |
| WebM | 150-400 KB | Full colour |
The colour limit is the other cost. A GIF of a screen with gradients or antialiased text shows banding and dithering, which looks worse than the thing you recorded.
Make a video behave like a GIF
Four attributes and the viewer cannot tell the difference.
<video autoplay loop muted playsinline
poster="/rec/bug-still.webp"
width="960" height="600">
<source src="/rec/bug.webm" type="video/webm">
<source src="/rec/bug.mp4" type="video/mp4">
</video>
Muted is not optional. Browsers block autoplay with sound, so a video that is not muted simply does not start.
The playsinline attribute stops phones taking the video full screen, which would otherwise break the illusion entirely.
The poster image shows while the video loads and is what appears if it fails, so choose the frame that best shows the point.
More on the pattern in embedding video with autoplay and loop.
Record only what matters
The largest saving is not the codec. It is length.
Most shared recordings run four times longer than they need to, because the recording started before the relevant thing and stopped after it. Three seconds showing the failure is more useful than thirty seconds of navigating to it, and a fraction of the size.
Crop the frame too. A recording of one dialogue box does not need the whole desktop, the dock, and your other windows, which also avoids showing what you did not intend to show.
Caption it
A recording without a caption makes the viewer watch the loop three times trying to work out what they are meant to notice.
One line underneath: what to look at and what is wrong with it. "Watch the total on the right. It updates on the second click, not the first."
That sentence saves everyone the three loops, and it is searchable text where the recording is not.

Offer a still as well
Some people cannot use animation comfortably, and some are reading in a situation where a loop is unhelpful.
A still frame of the important moment covers both, and it is also what people want when they need to look at something properly rather than watch it pass.
Where motion matters but autoplay does not, respect the system setting for reduced motion.
@media (prefers-reduced-motion: reduce) {
video { display: none; }
.still { display: block; }
}
Why the link beats sending the file
Chat clients cap attachment sizes, and a 12 MB animation often does not send at all. Those that accept it recompress, which for an animation of text is destructive.
A link is fetched once at the quality you saved. Fifteen recipients get fifteen identical viewings rather than fifteen recompressions, and the caption travels with it.
Related: screenshot link for the still-image case, and HTML animation to GIF if you specifically need the format.
When GIF is still right
Two cases, both narrow.
Somewhere that genuinely will not play video: a few email clients, some older systems, certain forum software. And very short animations of a handful of frames, where the format overhead is not worth avoiding.
Everywhere else, the video is smaller and looks better.
Put it at an address
Record only the part that matters, export as MP4, set it to autoplay muted and loop, caption what to watch, offer a still, and create a share link.
It loads instantly and arrives looking like what you recorded.