Block any included website besides all other websites

I am trying to create a script to block any included website (included in an includes() test) besides all other website but it doesn’t work. Any ideas what I did wrong please?

// ==UserScript==
// @name         block_any_included_website_besides_all_other_websites
// @match        *://*/*
// @run-at       document-start

// ==/UserScript==
window.setTimeout ( ()=>{
if (window.location.href.includes('wikipedia.org')) {
    window.open("https://example.com/", "_self");
    // window.location.replace("https://example.com");
    // window.location.href("https://example.com");
}
}, 100);

Reinventing the wheel?
(Install something like the Redirector extension. Let someone else do the coding.)

Does the code actually get to the stage of trying to execute window.open?

If testing if it reaches that stage is done with the “Network” tab in the dev tool than I got to say - I don’t know how to work with this tab, the interface there confuses me.

Otherwise I’d ask, why wouldn’t it reach that stage? I mean, I recall to also try document-idle and document-end and when combining these with a setInterval() that pretty much should cover all stages, should it not?

I have also tried a self executing function which I understand to reflect document-start and listening to the load event which I understand to reflect a document-idle situation and if I am not mistaken, everything works in console but not in a user script.