How do I make tabs in the Monaco editor like Visual Studio Code? For example, this is what I mean.

There is a quite good explanation on monaco-editor GitHub.
The tab is just a visual representation of Radio Button or Simple Button for example, where you have to subscribe onChange event. In the event handler, you have to update the model and view state, e.g. switching between foo.js & foo1.js files.
editor.setModel(data[desiredModelId].model);
editor.restoreViewState(data[desiredModelId].state);
I had the requirement for Monaco editor with tabs and built this project which you can use as the license is MIT: