If you want an editor-based experience, I’d recommend using Playgrounds in MongoDB for VS Code.
Playgrounds are JS-like environments where you can write scripts in MongoDB-shell syntax and see the results right away in the editor. Documentation is available here: https://docs.mongodb.com/mongodb-vscode/playgrounds/