You need to try hard to build a slow desktop app (using native libraries). There're some simple rules to follow if you want a snappy desktop app (like running heavy or I/O tasks in a separate thread). If your app is huge (like MS word), it might be slow, but that's another level of the problem.
There're no simple rules if you want to build a snappy web app. You need to think about performance on all levels. You need to think about TLS handshake. Does your certificate fits into first TCP packet? Does your entire conversation fits into first ten TCP packets? That's hard stuff. Is your CSS layout fast enough? Did you think about every resource your website uses?
That's just an observation. I don't know what to do. I don't even know how would I make it better. Web stack is mostly reasonable. Sometimes web stack goes to great lengths in pursue of performance, like replacing TCP with QUIC. That's huge technical accomplishment. WebAssembly is pretty fast for a sandboxed VM. JS is crazy fast for a dynamic language. Yet some startup webapp will make 60 HTTP queries on its first page and that's considered a norm.