This is specifically the GNOME (GTK 3) file dialog (using the Breeze-GTK theme, apparently).
The "XDG Portal" system allows each desktop environment to provide its own implementation of these dialogs – the same portal-using program can have a GTK 3 file dialog when in GNOME when "xdg-desktop-portal-gtk" is running but will have a Qt-based file dialog when in KDE-Plasma when "xdg-desktop-portal-kde" is running.
Also, programs that are not using the XDG Portal system will always use the dialog provided directly by whatever toolkit that program is written in. So if the portals facility is not available, programs built on GTK 3 will always use the dialog built into GTK itself regardless of the environment.
You cannot pin anything to the topmost section in the GTK 3 file dialog; it only lists the standard "XDG User Directory" locations (although those can be relocated through ~/.config/user-dirs.dirs
).
There is however a separate bookmarks section below the mounted locations – you can right-click any folder in the file dialog and select "Add to bookmarks". If your system has Thunar (from Xfce) or a GTK 3-based version of Nautilus (the GNOME file manager), they also share the same list of bookmarks.