i know there's a formula using temperature and salinity but are there other ways?

Well salinity would apply to solvent which dissolve salt, e.g. water.

Density is mass per unit volume, so the basic method would be to measure mass and volume from which one would calculate density. Density can be 'correlated' with temperature. Temperature affects volume by virtue of thermal expansion - and volume could be measure by displacement of a calibrated volume, e.g. column of liquid with fixed cross-sectional area in a graduated cylinder.

Adding salt may increase the volume slightly, but the mass would increase at a greater rate.