Because you are using same name for all the fslightbox instances.
data-fslightbox="gallery"
fslightbox instances documentation
You need generate unique id for each fslightbox instances, you can read a tips shared here:
you can try this: (not tested)
{{ with $.Get "title" }}<h3>{{ . }}</h3>{{ end }}
{{ with $.Get "content"}}<h4>{{ . | markdownify }}</h4>{{ end }}
+ {{ $seed := .Get "src" }} <!-- you can change this -->
+ {{ $unique := delimit (shuffle (split (md5 $seed) "" )) "" }}
<div class="gallery">
{{ range $image := (.Page.Resources.ByType "image").Match (printf "%s*" (.Get "src")) }}
{{ $src := $image }}
{{ $thumb := .Resize "500x" }}
+ <a data-fslightbox="{{ $unique | safeHTMLAttr }}" href="{{ $src.RelPermalink }}">
<img
class="lazyload blur-up"
data-src="{{ $thumb.RelPermalink }}"
alt="{{ .Name | markdownify }}"
>
</a>
{{ end }}
</div>