Formal verification is not a silver bullet! I am afraid AI has positioned it as the ultimate red herring (and nerd-snipe).
I recommend reading Cantwell Smith's "The Limits of Correctness" https://dl.acm.org/doi/pdf/10.1145/379486.379512
The TL;DR is that proofs only show that the program matches a spec, not that the spec matches the world. The gap between "what you can model" and "the real world" is generally too large for formal methods to be useful (outside of narrow domains, where they are highly useful).
In other words, computing is closer to an empirical science than a formal one.
Proofs are programs themselves. So if you generate the very program from your proof (like with lean), that mismatch should not really happen.
Of course you may have still written incorrect spec, and once you have IO you probably won't model the whole Linux kernel in the proof.
You can say the same about tests, yet they're useful and everybody is using them.
The gap between the spec and the world is a minor technicality that will be solved in 1 month, max. You can quote me.
"If civil engineers built bridges like how software engineers write software there would be no bridges left today"
The program matching the spec matters a great deal for security purposes. If we achieve nothing other than that, we’re in a much better position than we are today with C and PHP.