If the search is “how to stop watching porn,” the pattern is usually nightly, not random. That means the fix is a bedtime protocol: devices leave the bed, the last tab is not a search, and you have a replacement (shower, walk, breathing, a show in a shared room).
Blockers help as a speed bump. They fail if you hold the passcode and the urge is strong. Pair a block with an in-the-moment tool so you are not staring at a blocked page with nowhere to go.