Please take a backup of the device and perform a factory reset(data will be erased). Secondly, change the Google account and other accounts' passwords that are configured in the device.
Note: It is recommended to download trusted third-party apps from Google Play Store only.