Can I upgrade my Retina 4K, 21.5-inch, 2017 without erasing my hard drive?

Hi everybody,

I have 20 Retina 4K, 21.5-inch, 2017 iMacs at my school that I need to upgrade as adobe photoshop told me it was recommended to use a later OS than my iMac can support. Is there a way to upgrade those iMacs without erasing the hard drive as it's full of students files? Thanks in advance

Author: @t_u_r_o_k