To find this resource, you will have to venture into the caves up to the Bedrock level. Here you will have to look for a biome called Deep Dark, which is covered in dark blue blocks. Here you will have to look for a special structure called Ancient City, similar to some stone ruins in the middle of the Deep Dark biome.
Inside the fortress you will find some Echo Shards. Just be careful not to wake the Guardian.
Now that you know how to get echo shards in Minecraft, you are more than ready to use them in crafting a special device called the Recovery Compass.