In the UK (and Commonwealth countries) a Coroner is a Magistrate who is tasked with enquiring into deaths, fires and treasure trove. Trove is generally old treasure caches where the owner has gone and is indeterminate, not caches where an owner may be traced or suggested so that more modern law could be applied to determine who gets to claim it.
Trove is the property of the Crown, in the old days the King which is the State now.
TV shows make out now there are Coroners who take part in or do investigations themselves. They don't, they just preside over the Coroner's Court.
A Doctor will do the autopsy and present his opinion, an expert (say a Professor who has studied fire or history) will give his opinion and the Police (in ye old days the Sheriff) will investigate and present their findings to the Coroner who will make a determination whether an obvious answer can be rubber stamped or a full enquiry called an Inquest needs to be conducted.
In America they have Medical Examiners that are more like investigative Doctors who work with the Police . They still present their evidence to a Court that makes the final determination.
There are now statue laws which gives the finder a percentage of the monetary value of the trove so people will declare it rather than keeping it secret because in the old days it was all just taken by the Crown.