If this is going to incrementally evolve into your own photo and video management database, seriously consider reviewing and starting out using one of the available photo and video databases.
Or if you prefer to learn more about image and video metadata including about Exif metadata, I’d consider using better tooling than Shortcuts.
One tool for a more complete photography database would be Filemaker Pro, and that seems to have support for Exif and other metadata available. Probably need another tool to set the Exif data, as I don’t see a matching set function. But Filemaker Pro deals with a whole lot of the rest of a photo-management application.
If you were to use a shell script such as zsh shell built into macOS as the foundation for your photo management platform and tooling, get exiftools, and load the metadata you want into the image, if it isn’t already loaded into the image or video by the camera. The exiftools package can read and write many formats, including the metadata from MP4 video files.
To test the file contents, use the file magic tool available at the command line. man file The built-in file tool works reasonably for this case. (If you should evolve this and be accepting files from untrusted sources, I’d likely switch to the OpenBSD file magic tool, as that’s more robust against shenanigans.)
Filenames are probably best kept as UUIDs / GUIDs or other such “generated” unique names to avoid the seemingly inevitable naming collisions when some sequence number or another get restarted, or some second or third or forth device produces conflicting names, as tends to happen with apps and cameras and apps that use sequence numbers.
I’ve previously posted a zsh bulk file rename tool here: short cut date as file name - Apple Community
Various folks that have previously traveled this path can be found searching for exiftool references around here and else-network, too. It’s a tool that’s widely used for these tasks.
Might want to ask Apple to improve this area, both renaming, and for enhancing Shortcuts with direct Exif metadata and related access. (Right now, it’s probably easier to use the command shell directly, or to use Shortcuts to access the shell and exiftools or such.)
Two previous threads you’ll want to skim:
How to remove metadata in a an .mp4 file … - Apple Community (exiftools examples)
Using script: rename a file with "text_MM… - Apple Community (Swift code, and Automator calling exiftools)