The Wave Function Collapse algorithm is a popular approach to generate random maps or boards from smaller tiles.
By progressively excluding invalid combinations and picking random tiles based on what's left over we can generate many variations of valid landscapes.
Below is a video of the example app. It shows the stepped debug view on the left and generating random solutions on the right.