How to change tab size into 4, instead of the standard 2 spaces?

Since it’s a space-based indent (rather than a tab based one)… you need to apply the changes after making them.

i.e. After changing this setting (click on it to change)…

… you then need to re-format your code (right click → Format Document, or Format Document With... if VSCode is being stupid and listing multiple formatters)

image