Window glazing merits using quality products and practice because you don’t want to do it again. Quality glazing compound (Window Putty) and linseed oil are still available at most paint and hardware stores.
The reason your one-year old putty shrank and pulled off the sash so easily was because the dry old wood sucked the oil out of the putty before it cured. It was also hard pressed to bond to the dry old wood.
The trick my grandfather taught me was to coat the wood after removing the old glazing with linseed oil. It is one of nature’s natural wood preservatives. It hardens the old soft wood, preserves it, and acts as a bonder for the glazing compound to adhere to.
It does take a little time to prime the wood with linseed oil before glazing but it’s well worth it.