You can solve it by putting a link with the correct one on the desired page.
In your case, on the page "how to put a fence somewhere in the text (preferably at the end) enter the phrase" like you will be interested in how to paint a wooden fence?. "The phrase "how to paint a wooden fence will be an anchor, as the changes get indexed, after 1 -2 weeks everything will rise to the right places.
The main drawback, you have to do everything manually. There is an option, acceleration, using the plugin "similar articles", where H1 will be an anchor, accordingly, it will create such links but you will have to adjust them.