seismographs work best underground because it detects and measures Earth's ground motion so it works better if it’s underground in the earth.
Seismographs won’t be able to detect the small earthquakes if it was above ground because it moves when the ground shakes.