why are we putting parentheses upon creating an object, for example, what is gonna happen if we removed the parentheses around the (new String())?
var upper = (new String(str)).toUpperCase();
There's no point to those parentheses, new has high precedence and the result would be exactly the same if you didn't have the parentheses there.
Your question applies generally (for instance, (new Date()).toISOString() vs. new Date().toISOString()), but just for what it's worth new String(x) in JavaScript is generally unnecessary at best or potentially a bug at worst. It creates a string object, whereas normally we interact with string primitives. The difference can matter sometimes, for example new String("x") == new String("x") is false, because two separate objects are never == to each other.
There's almost never any reason to use a string object.
That code may have been trying to defend against the possibility that str wasn't a string, by converting it to one. If so, remove the new:
var upper = String(str).toUpperCase();
String without new does a type conversion (to a string primitive).