You should generate
compiler_commands.json
for your project, how to do that depends on your build tool. Then Intellisense should be able grab to compiler flags from it automatically, which should remove false positive red squiggles. I also had better experience with Clangd instead of the stock C++ plugin, but your mileage may vary.