As the others said, flashing cf autoroot in odin won't erase anything, will leave your phone as is and will add supersu.
You should be aware that by rooting you will trip the knox flag, which permanently breaks samsung pay, and will break the following stuff on the stock rom: private mode, secret mode in the browser with fingerprint authentication (which can later be fixed by flashing a custom Rom).
If you want a properly working twrp recovery, you will have to erase everything, including the internal storage of the phone, there is no way around it.
If you absolutely must have root and you're into custom roms then I say do it now, if you're OK with the stock firmware I would advise not to root. This phone doesn't have too much development and you should not expect too many custom ROMs. I personally regret rooting.