Unfortunately, chemistry is not as simple as going
Oh, I spotted $\ce{OH}$, it must be a basic compound!
I would argue that the vast majority of all compounds one could write with $\ce{OH}$ inside are either neutral or acidic and only a minority is basic.
Take, for example, sulphuric acid. As Ivan correctly mentioned in a comment, rather than writing the traditional $\ce{H2SO4}$, you could also write it as $\ce{O2S(OH)2}$ which lays more emphasis on the molecular structure (to hydroxy groups and two oxy groups all bound to sulphur). We all know that $\ce{H2SO4}$ is acidic, not basic, even though it has $\ce{OH}$ groups.
Or take alcohols such as methanol ($\ce{H3C-OH}$) or ethanol ($\ce{H3C-CH2-OH}$). These also feature $\ce{OH}$ groups, they are even commonly written that way, but are about as acidic or basic as water ($\ce{HOH}$) is.
So the question may be why did you get taught that $\ce{OH}$ is basic? Well strictly speaking, it is not the $\ce{OH}$ hydroxy group that is basic but the $\ce{OH-}$ hydroxide ion. Only those compounds that dissociate into some cation and a hydroxide ion can be considered basic. For that to happen, ‘some cation’ typically needs to be metallic, at least at your level. So recognise a metal bonded to $\ce{OH-}$ and you should most likely be right calling the compound basic.
Some final notes:
You should always check the directly corresponding conjugate acid. So when analysing $\ce{K2SO4, Na2CO3}$ and $\ce{(NH4)2CrO4}$, trace them back to $\ce{HSO4- , HCO3-}$ and $\ce{HCrO4-}$, respectively. That still leaves us with two rather strong acids but the third ($\ce{HCO3-}$) is even weaker.
The conjugate acid to methanol $\ce{H3C-OH}$ would be the methyloxonium ion $\ce{H3C-OH2+}$, which is a strong acid. This goes for pretty much all organic hydroxy groups.
The $\mathrm{p}K_\mathrm{a}$ of water — hydroxide’s conjugate acid — is $15.7$, so yes, that is a very weak acid.