Modern security rated replacement windows can be very secure. Multipoint locking with night vent catches, anti jemmy hinges and dead bolts, internal glazing beads, etc. To get in basically the lowlife is gonna have to break the window.
Same applies to security doors.
Upgrading an older window, or door that does not have these features is much more difficult. Basically the window or door is being secured at only a specific point by a surface mounted lock, rather than something concealed in a secure by design unit, the scroat can see the lock and knows exactly where the force it.
Alarms can work, but not necessarily. They can say to the unscrupulous "I've got something to protect". So many alarms go off these days they have a tendency to be ignored. To be of any real value they need linking to a central monitoring station.
Some of the best protection can be by making your property harder to get to than a neighbours. Strong fencing and gates make access to the rear garden harder (don't put your wheelie bin somewhere that is can easily be seen and moved as a climbing aid!). Plant *****ly roses and other shrubs in front of front windows.
Even with a secure building the determined burglar will still get in, but they risk a higher chance of being disturbed as they will take longer. The opportunist will take one look and decide they'll go somewhere easier.
*edit seems I cant say p-r-i-c-k-l-y