It's a hidden file so in finder, Press ⇧⌘. —the command-shift-period chord—to toggle the display of the hidden files, and the Library folder will then become visible in your home directory. And will become invisible, when you press that chord again.
In Finder's Menu, select Go menu>Go to Folder, and go to "/volumes". (no quotes)
Volumes is where an alias to your hard drive ("/" at boot) is placed at startup, and where all the "mount points" for auxiliary drives are created for you to access them. This folder is normally hidden from view.
Mine..
Macintosh HD
OWC Envoy Pro mini
SSD2
Update
Sonoma - Data
SonomaApplications
Macintosh HD - Data
BigSurApplications
SSD3aApplications
Add the external Drives name, SSD2 in my case...
If in terminal enter...
cd /volumes/SSD2/var/db
ls -a
Or...
rm /volumes/SSD2/var/db.AppleDiagnosticsSetupDone
If there's a space in the Volumes name then enclose the name in Quotes...
rm /volumes/"SSD 2"/var/db.AppleDiagnosticsSetupDone