Following it, I compressed the .wasm and .pck file, and the build came out to be 5MB. But it’s still a bit big, I need even an smaller size.
I need to reduce it even further.
Also, I am aware of stripping the engine and compiling it, which I’m saving as the last step. Also, I am quite unsure of how to approach this whole “building” thing works.
That 19 Mb is the cost of having a fully-featured engine that remains as easy to use for small and large games while targetting any kind of platform. 5 Mb is actually a very good compression ratio for something as featured as Godot.
If you want to reduce it further, the last thing you can do is indeed compile it by stripping features you don’t want, as explained in Optimizing a build for size — Godot Engine (stable) documentation in English
Not everything can be stripped, as it becomes increasingly difficult to do so without starting to breaking interdependent parts of the engine (while some others still need to be improved to support stripping).
If this is still not enough, then the question of using Godot at all rises. If your game is going to be smaller than perhaps 4 Mb, you could be using something more dedicated to the web platform, like Three.JS directly with Javascript.
Note: if you have separate .pck and engine runtime, I can imagine that your browser can actually cache the engine file so it won’t reload it next time you go on the page, if the engine file didn’t change of course.
Web games in particular are difficult to minimize, since you still want to be available on as many platforms as possible.
The best approach here is to keep all resources as small and optimized as possible, which is then expressed in a small .pck file.
For the rest you have to start cutting the engine piece by piece.