You better understand the value proposition of game engines than you think.
Spin your view a little: NPM is your web development engine. Somebody had to write all of that code that undergirds NPM as an engine as well as the particular library you want to install.
Game engines are no different. They manage a bunch of (mostly boilerplate) game development components (sound, textures, rendering, animation, menus, collisions, physics, resource I/O, etc etc) so game developers can spend time "gluing stuff together, and sanding the edges" of their game. Monolithic engines like Unity have a plugin system for installing 3rd party libraries, and the engine tooling itself acts as its own level, effect, cutscene (etc etc) editor.
At the end of the day games are just like any other programming task. You have a limited amount of effort/time/budget, so you have to make decisions about where you want to optimize. Game engines, even monolithic ones like Godot and Unity (and, really, every 3rd party game development tool) are all designed to let you focus effort/time/budget on the unique aspects of your game.
Spin your view a little: NPM is your web development engine. Somebody had to write all of that code that undergirds NPM as an engine as well as the particular library you want to install.
Game engines are no different. They manage a bunch of (mostly boilerplate) game development components (sound, textures, rendering, animation, menus, collisions, physics, resource I/O, etc etc) so game developers can spend time "gluing stuff together, and sanding the edges" of their game. Monolithic engines like Unity have a plugin system for installing 3rd party libraries, and the engine tooling itself acts as its own level, effect, cutscene (etc etc) editor.
At the end of the day games are just like any other programming task. You have a limited amount of effort/time/budget, so you have to make decisions about where you want to optimize. Game engines, even monolithic ones like Godot and Unity (and, really, every 3rd party game development tool) are all designed to let you focus effort/time/budget on the unique aspects of your game.