The reason why Zhao Hai thought of turning his realm into the shape of a stone giant was because he was reminded by the demonic Dragon King and the others. When the demonic Dragon King and the others attacked him for the first time, they turned his realm into the shape of a skeleton archer. Zhao Hai wanted to see if his realm could turn into the shape of a stone giant. It was impossible to say, but it turned into a stone giant with just one attack.
The success this time made Zhao Hai's heart light up. He understood that the so-called self-learned domain attack was because there were too many ways to attack, so the space didn't give him any hints. It just let him learn it himself.