As a film comes out of the camera (or is exposed when shooting sheet film), it gets recorded in a little Luechttrum book with a sequential number. That number gets written on the cassette or the roll or on the film holder. The notebook also records camera, lens, iso, and location.
When I run films the number gets transferred to the film as it hangs to dry, then to the print file page as films are sleeved. It is simple enough to keep track of which film is which in the developing tank. The number on the print file page is quite legible on my proof sheets.
When I make work prints I note the date and the roll number.frame number on the back in pencil. I can then look up in the darkroom diary, by date, what developer and paper I used that day. These notes go back years. To 1986 actually. The three years of negatives I have from before this were retroactively numbered when I started this method, but there is no darkroom diary before '86. None of the papers I used then are still made anyhow, and I've long since left Dekol behind. I just sleeved up films numbered 7203 and 7204 today. After I proof them they'll go in a 1" Staples Better Binder, 50 Print File pages per book. If I print the first frame from roll 7203 it is noted as 7203.1
Color negative film is treated in a similar fashion, with the prefix C before the number. Those are a separate series, with proof sheets and paged films stored in a clear archival sleeve, and in boxes. Scans are done by the lab, when I transfer them to the hard drive I give the folder for that roll the number from the notebook. I don't re-number the individual scans. I think I'm at about C1200 something now.
Slides get a sequential number, stamped on the mount, and any scan is treated as the color neg scans. Slides get numbered year.#, so 95.0001 or 16.0001, etc. I rarely shoot slides anymore, but when I did stock shooting this was invaluable in knowing what originals were where and in keeping track of similars. I kept roll numbers on the stock slides when shooting and processing, but once they returned from the lab they were edited and numbered anew. This was a time saving thing as my numbering stamp was cumbersome to adjust. There was a carefully curated database of keywords, locations, etc that allowed me to find things, when the software was no longer compatible I printed it out, but it is likely useless, as are the bulk of the slides anymore.
Other than the slides, less time consuming that it might seem, and with a print in hand I can put my fingers on a negative within a few minutes, whether it was shot in 1986 or last year.
Digital files are another matter. I number each card as I do my films, with the prefix D, but do not have proof sheets of it all, have many gaps in key wording, and now at folder D1286 getting my cursor on a DNG can be very frustrating.