There are certain benefits and disadvantages, from a security standpoint, to living in an apartment or condominium.
In a complex of any size, management often takes on the responsibility of providing security, at least in general. They will sometimes hire private guards. But even when they don't, in the majority of cases they take some efforts to see that the grounds are secure. That helps them, of course, since a secure environment makes the complex a more desirable place to live.
But most will not concern themselves with individual security as, realistically, they can not. There are typically simply too many units to protect one-by-one. They may have fences, even alarm systems, but only for the perimeter and selected buildings. They can't afford to look after each apartment or condo.
That means the responsibility for security rests on the shoulders of those who are most directly concerned: the tenant. Fortunately, there are a great many things that can be done inexpensively to do that.
The obvious involves such things as keeping windows and doors locked. Most complexes won't allow installing an individual alarm system, but fortifying entrances with proper locks, window bars and so forth can certainly be done. Sometimes the expense will be a joint effort. Other times it is up to the tenant alone. But the expense and effort are well worth it, since it's the tenant's possessions and safety at issue.
Behavior plays a large part in personal security, and that can be carried out in a complex at least as easily as in a neighborhood. A neighborhood watch program can be developed within an apartment or condo setting. In many cases, this is easier to carry out in that situation than in a housing tract. There are more people around during all hours, typically, and the view is often more open.
Personal behavior plays a part, too. Don't admit strangers through the gate, 'as a favor', even if they give you the name of a neighbor. Walking to and from the garage or parking area at night or when there is no one else around is a concern. Walking with keys or pepper spray cannister in hand is a reasonable precaution for most women. Being aware of the surroundings is wise for everyone.
Just as with a house, don't admit strangers unless they're from reputable companies you do business with regularly. They may decide to come back later when you're not there. Or, worse, when you are. Take a peek through the peephole and require identification. Thieves may go to the trouble to disguise a vehicle, but they rarely carry proper ID cards, since they don't expect to be asked.
Lastly, whenever possible, consider security when selecting an apartment to rent or condo to buy. After moving in it is usually too late to get the owners to change locks, improve lighting or repair a gate lock. But beforehand, you may have some leverage. It may require going with another choice. Weighing the options of where to live can be difficult, but security considerations should be high on the list.