Rules to follow while writing a chemical formula for polyatomic ions
What they are trying to say is that hydroxide $\ce{OH^−}$ and nitrate $\ce{NO3^−}$ ions, which are polyatomic anions react bond with cations as a group.
When $\ce{NO3^−}$ bonds to $\ce{Na^+}$ only a single nitrate anion bonds to a single sodium cation, to form $\ce{NaNO_3}$ so brackets are not needed. You can still use them, in which case it would be $\ce{NaNO_3}$ but it is redundant and current convention doesn't use it.
However, when $\ce{OH^−}$ bonds to $\ce{Ca^{2+}}$ two hydroxide anions bond to a single calcium cation, to form $\ce{Ca(OH)_2}$ so brackets are needed to avoid confusion and show the structure of the compound.
Old ways of writing it (before my time) before the conventions were standardised, such as $\ce{CaO2H2}$ or $\ce{CaH2O2}$ don't immediately show that it is a hydroxide, so would have been confusing to non-experts.
To reiterate: the brackets are used when there is more than one polyatomic ion in a compound.  So if you write down sodium hydroxide it is $\ce{NaOH}$ but calcium hydroxide is $\ce{Ca(OH)2}$