Technically, the Samsung J2 Prime is an Android Phone. Am I correct in thinking that you're asking how to update the software of the phone?
If you need to update the phone's system, just go to Settings > System > System Updates >Check for System Updates. If one is available, then you should have the option of downloading the latest Update.
Currently, the Samsung J2 Prime is supported all the way up to Android Nougat (Android 7.0). I wasn't able to find whether or not the J2 Prime line will get support for Android Oreo (Android 8.0) or for Android P.
Hope this helps!