HOA fees can go up (or not) every year, or every few years, regardless of whether the style of the unit is an "apartment" or "townhome" (stand alone).
I live in a condo complex - the style is comprised of townhomes - and we get an increase every few years or so, based on the projected budget for the coming year, and also based on keeping a healthy balance for future maintenance projects.
Ask what the fees have been over the past 5 years to see how many increases there have been.
Make sure any complex you are considering is financially sound, and ask if there have been , or currently are, any special assessments (these cover larger than usual updates or repairs).
Know that older complexes will/may be dealing with upgrades that younger complexes might not need as yet.
Ask enough questions - get the answers - so you won't be in for any unexpected surprises!