An error in styles.scss which should be ignored

Following the guide I put the exact contents recommended for the assets/css/styles.scss file. However, unless wrapped in curly brackets it shows an error in VSCode: { expectedscss(css-lcurlyexpected) When the curly brackets are present the site does not work as expected and after reload I get this error multiple times:

css 1:2  root stylesheet 
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/styles.scss':
                    expected "}".
             Error: expected "}".
             Error: Run jekyll build --trace for more information.
      Regenerating: 1 file(s) changed at 2023-05-23 12:33:43
Error: expected "}".
1 │  {
  │  ^

I found discussion, but it’s still an open issue. Is there a jekyll workaround to ignore this error?