There are projects that tried to create SwiftUI for the web, the most notable of which is IMO TokamakUI. Of course, due to limited funding, this project is still in a primitive stage and not ready for real deployment.
Some of the biggest challenges result from the fact that Swift on the web is not well-developed. Web apps are incredibly small ~300 KB, but just the Swift standard library (the building block of almost all Swift apps) is 3 MB. That's a 10x difference for a hello-world app. Another challenge is breaking up the binary into chunks. Web frameworks have become incredibly good at this, since it's critical for big apps with many pages to scale. The Swift compiler, though, can only create one optimized binary, and I'm not sure if there are any projects that enable this. Lastly, apart from binary-size concerns, we have to remember that web technologies interoperate together, so it's relatively easy to use a random NPM package to implement a niche feature when using web technologies. For a Swift-based framework to compete, it would need to offer extensive support for CSS, fetching and using of JavaScript plugins and seamless importing of HTML components.
Each of those issues requires extensive engineering efforts to realize, but there is some light at the end of the tunnel. Because SwiftUI offers an amazing API and developers practically have to use it on IOS, there is a chance that a smaller binary-size version of TokamakUI could be usable. Thankfully, there is active development on Swift for embedded devices, which also require small binary sizes, so these improvements could be used for Swift on the web. Further, SwiftUI already has a good package ecosystem and extensive support due to development on Apple platforms. If these packages could be ported to TokamakUI, more web developers could start using Swift. If there is enough adoption and subsequent investment, it is possible to resolve the remaining issues of chunking support and integration with web technologies.