Search for tri-planar shader. This is a technique where the shader looks at the normal of the vertex and blend textures together. The shader will take a grass texture (for example) and perhaps 2 rock textures. It will then assign the grass texture to normals facing up and rock to the normals facing to the sides. It also blends between them
There are several ways to generate terrain. The heightmap way you mentioned is a popular one. Sebastian Lague has a great series on youtube regarding that technique. Games like Valheim uses this technique and I’m currently working on a game that does, too.
It has it’s downsides like not being able to have overhangs, etc. but for that he also has a high-level tutorial on marching cubes, which is another technique. Games like Astroneer and I believe No Man’s Sky uses marching cubes in some way. I’ve used this, but it’s a lot of processing and requires a bit of thinking (and DOTS) to help it go quick. Unless you do it with compute shaders - which I know nothing about.
Then you can check out Jonas Tyroller who made a game called Islanders. He used a technique of placing premade assets procedurally and explains a bit of how it works somewhere on his youtube channel
Lastly, I’d mention Oskar Stålberg who made Townscaper and Bad North. You can find lots of info on Wave Function Collapse (that he used). It’s quite an advanced technique in my opinion.
Oskar doesn’t have a youtube channel, but here are some stuff on youtube:
List of all the games I mentioned (on steam - no affiliation)
No Man’s Sky
Wave Function Collapse