Auto-material UE5

Hi everyone,

I am started unreal engine 5 one week ago and I watched this tutorial https://www.youtube.com/watch?v=Y-CDWyQvKhA&t=1783s&ab_channel=UNFGames.
The tutorial start with a Heightmap landscape. From what I understood, it use the Heightmap to have elevation information (at 23:56). But How can I have such information from an hand made landscape in real time to automatically add the material I want according to the Heightmap modifications.?

Thank you in advance for your help.

P.D. Sorry for my English, I am not a native speaker.