I can’t be sure what is wrong specifically but there problem is VSCode cannot reach port 5007 (I think) on you OH server or you never configured the openHABb extension appropriatly.
When configured correctly and when VSCode can reach the language server on OH itself, the same only better code completion is possible in VSCode.
Comparing the ESHD example posted by @karl24 and this from my VS Code, it looks like ESHD has better code completion. VS Code is great, but maybe I have something misconfigured too and missing out on more awesome? Hmmm…