A lot of UB is runtime behaviour that would be difficult to statically analyse. UBSan (-fsanitize=undefined -fno-sanitize-recover) does a good job of detecting it at runtime.
A bunch of UB is of course static, and often comes with compiler warnings. Some UB doesn't have compiler warnings, but is found by linters and analysers (such as clang static analyzer).
UB is pretty damn fundamental to C. Not many people realize it though. It's the fundamental difference between C and C++ compared to Python or C# or Java or Rust or whatever.