To stay safe you can always ask a trusted adult to check what you want to download before you install it, and if they say okay to download, then your parent will install it for you.
You should get a virus protection subscription to protect you but if something goes wrong then you should tell your parents/an adult you can trust straight away or press virus clearance
When you are downloading something, you are getting information from the internet.
Try this e safety based video