If an official OTA update exists, use it. If you must flash manually, confirm your hardware revision, follow vendor or well-documented community instructions exactly, back up data, and be prepared to restore stock firmware if problems arise.
If you previously installed TWRP: