If the buried treasure is Islamic, it is considered Luqta (lost property), and the finder must announce it to locate its owner. If all efforts to find the owner fail, the finder may take ownership of it. If the treasure is non-Islamic and consists of gold or silver, zakat must be paid on it, which is one-fifth of its value. And Allah Knows Best.