If you have automatic updates turned On @paranoidandroid1 then this will only allow trusted updates from Samsung.
It's the same as manually checking in Settings, Software Update.
You can also check in that section of Settings when your last software update was successful.
Dodgy files such as some Apk files can only be downloaded if a person turns off the setting that stops files from unknown sources and then intentionally downloads an apk via their Internet browser.
Can I ask what's happened to your phone to make you think something is wrong ?
Current Phone ~
Samsung Note 20 Ultra 5G SM-N9860_256Gb SnapDragon 865+
Samsung One Ui 3.1/ Android 11.