How can I set up VSCode to put curly braces on the same line?

The settings you are looking for are:

{
  // Defines whether an open brace is put onto a new line for control blocks or not.
  "javascript.format.placeOpenBraceOnNewLineForControlBlocks": false,

  // Defines whether an open brace is put onto a new line for functions or not.
  "javascript.format.placeOpenBraceOnNewLineForFunctions": false
}

Please refer to the User and Workspace Settings article. It covers similar settings for other languages too.

If that doesn't provide enough control you may also choose to use Beautify and specify a .jsbeautifyrc

with a setting for brace style as follows:

{
   "js": {
       "brace_style": "collapse,preserve-inline"
    }
}

Please refer to this to see all possible values.

UPDATE

It was pointed out that there is another degree of control where if you would like to change the formatter completely, you do so by installing the correct VS Code plugin and then configuring the appropriate formatter (see User and Workspace Settings article). For example:

"[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
}

In this case the formatter being used is Prettier - Code formatter