See
[Samsung] How to flash Stock ROM via ODIN - you'll have to flash the stock ROM (make sure you use the ROM for your variant of the S6 - you can't mix phones and ROMs), you can't update a rooted phone. (Make sure, if you don't normally, which you should, that you back up
everything of any importance to you, because flashing a ROM gives you a clean phone - none of your files, changes, anything, remain.)
Then update, if there's a later version than you were able to find a ROM for. (The normal update choice in Settings will do.)
Then find a way to root the new ROM - it won't be the same as the way you rooted the old one. (Rooting depends on finding a bug in the ROM, and the manufacturers always patch that kind of bug as quickly as they can - definitely before the update.)