They are different things that are only synonyms under very restrictive interpretations.
Rosin is the solid component of pine tar, exclusive of liquids such as turpentine. There are many kinds of pine, so there are many different rosins, but they are all from pine trees. Rosin is also called "colophony". As a flux, it is dissolved in a solvent, usually alcohol but could also be a light hydrocarbon like hexane, or even ethyl acetate. Other modifiers like glycerol can also be added.
Resin is a very broad term, which encompasses both plant saps (liquid like rubber or solid like amber), insect secretions, and man-made chemicals. Their common property is the ability to form hard plastics by condensation reactions. As a flux, resin refers to chemicals derived from rosin with specific modifications. For instance, a single compound is extracted from the rosin, and then hydrogenated or reacted with another chemical. The effect is to customize the physical properties, like activation temperature, form of residues, and wetting.