To create a website using Javascript you must consider to use a framework like:
- React
- Angular
- Vue
Personnally I use React, Angular is a little bit messy but is good too,
I've never deeply tried to use Vue so make your own opinion about this one !
Otherwise, you can try something like Svelte or Vanilla Javascript.
It can seems a little bit difficult but when you get it, it's easy.
Don't... Don't even try!
JavaScript is run inside of browsers (generally). The point of JavaScript is to make web browsers more interactive. JavaScript is an interpreted language, meaning it is 'compiled' 'just in time' (JIT) which has an effect on its performance. I can almost guarantee all browsers are written in compiled languages like C++.
The fact that you are asking a question like this means that you have no idea the amount of effort it would take to create something like a web browser, let alone the right tools.
Probably the best and closest thing to a browser you'll be able to come up with is an iframe which a user can specify a url for.