Why did a .nomedia file get added to my device? Showing 0 Image, Audio or Video Files?
I think the file got created by some app on your device.

You can delete the file by using any file explorer. In the My Files app on Samsung devices you first need to go to its settings, and enable 'Show Hidden Files'. Then the file is visible and you can delete it.