Recently I read an article on this subject in which an image from a large format 8x10 camera was compared to an image from a Phase One medium format digital. Fair enough, the best of film versus the best of digital. They also included a Nikon D850, again fair enough. Not so many people shoot 8x10 and I bet a lot less would own a Phase One (at about $60K USD) so including a camera that a lot of people can relate to isn't a bad idea for comparison purposes.
The test was to take a couple of shots on each camera then look at 100% crops of small sections of each image and compare detail, sharpness, and contrast.
Spoiler alert: the large format shot won narrowly from the Phase One and both were far, far superior to the D850. A good result from the film camera considering the negative was only scanned at 4,000dpi.
The problem with the test is that it was a completely unrealistic comparison. Taking a single image and presenting it as-shot is one way to compare the formats but it is flawed; that just isn't the way that serious digital photographers work.
The Nikon is a fine camera but out of its league in this competition. More likely, the person with the D850 would have taken numerous exposures at a longer focal length and then stitched the images to form a composite with extraordinary resolution. If you used the same method with the Phase One I imagine the results would be mind-blowing. Search "gigapixel photography" if you would like to see some extreme examples.
Most of the time when people think of which is "better" they are considering the question from either a technical viewpoint or a convenience viewpoint. If you compare the two from either of those aspects then digital is the clear winner, every time. Yes, you can make an argument for film's dynamic range, or resolution, or whatever, the facts are that quality digital cameras and lenses have the potential for producing amazingly sharp and detailed images. With your digital device you can stitch panoramas, focus stack, take multiple frames at slightly different exposures and turn them into some kind of composite image that couldn't be done on film. But, so what?
Photos made on pin hole cameras are rarely in focus, always soft, and always lack contrast - and yet they can be stunningly beautiful.
Look at many of the famous photos taken throughout history, lots of them aren't even in perfect focus and yet we are drawn to them - because of composition, and light, and some intangible special sauce that makes us feel something.
The things that make great photos great have very little to do with resolution, or megapixels, or articulated rear screens. Great photos can be made regardless of the media on which they happen to be recorded.
Personally, I couldn't care less which camera and lens combination produces the best results when making photos of test charts and viewed at 300% magnification.
I certainly don't shoot film because I think it's better than digital. I shoot film because I enjoy the process so much more, the whole process; from shooting to developing to printing. I like mechanical cameras much more than I like little black boxes full of electronics. I especially like holding a hand made silver-gelatin print fresh out of the fixer. I feel like analogue photography has a sense of authenticity and integrity that I just don't get from shooting digital.
I feel the same way about music. I would much rather listen to a piece of music played by actual musicians, on musical instruments, rather than something programmed in Pro Tools and auto-tuned beyond recognition... Regardless of how well written the piece might be; one is crafted and the other is manufactured, one is a bespoke item, the other mass produced.
So, there you are... Film is absolutely and unconditionally better, for me, for no other reason than I like it more than digital.