Current burning issues in stellar physics, for both hot and cool stars, concern their magnetism. In hot stars, stable magnetic fields of fossil origin impact their stellar structure and circumstellar environment, with a likely major role in stellar evolution. However, this role is complex and thus poorly understood as of today. It needs to be quantified with high-resolution UV spectropolarimetric measurements. In cool stars, UV spectropolarimetry would provide access to the structure and magnetic field of the very dynamic upper stellar atmosphere, providing key data for new progress to be made on the role of magnetic fields in heating the upper atmospheres, launching stellar winds, and more generally in the interaction of cool stars with their environment (circumstellar disk, planets) along their whole evolution. UV spectropolarimetry is proposed on missions of various sizes and scopes, from POLLUX on the 15-m telescope LUVOIR to the Arago M-size mission dedicated to UV spectropolarimetry.