With the XRay Fabric mod, you can look through the blocks and quickly find all the valuable resources. This will greatly simplify survival, but this feature is cheating and is…
XRay mod for Minecraft 1.19.2
Minecraft 1.19.2 (August 2022) is the stable Wild Update build. An XRay mod differs from the texture pack in one thing: it has a switch. The world looks normal until you press X; then stone, dirt and the other filler blocks go invisible, ore and chests stay, and a second press brings everything back. The list of highlighted blocks is editable, so you can leave only diamonds and ancient debris, or add spawners and chests.
On 1.19.2 the maintained build is XRay Mod for Fabric; it runs on Fabric and Quilt and needs Fabric API. There is no Forge release for this version, so Forge users are better off with the texture pack.
On the 1.18+ world the mod is most useful below Y 0: diamonds cluster around Y −58, and the deep dark cities show up as grey halls once the stone is gone. Set the render distance of the mod to 32–48 blocks; more than that turns the screen into noise on a big cave system.

Servers
Keep it off on public servers. Anti-xray plugins on 1.19.2 send fake ore to the client, so the mod shows garbage, and the mining pattern itself gets you flagged. Singleplayer, LAN and your own private server are the places for it.
Prefer no mod loader at all? XRay texture packs for 1.19.2 do the same job through resource packs.