Keep apps and your operating system up to date. Malware and state trojans often exploit vulnerabilities in software. Up-to-date apps and an up-to-date operating system are therefore important.
More information
It is generally harder to extract data from your device if your apps and system are up to date. Mobile forensics investigations often rely on security vulnerabilities, which are then more difficult. Also bear in mind that your device could be taken from you when crossing borders or entering repressive or authoritarian countries such as Russia, the USA or China.