At the moment I'm not allowed to play games on my PC like Fortnite because my father claims that you can get a virus and who can play it? Is that true?
If you download cracked games, there's a virus from time to time. This is not an issue with purchased games.
For legally purchased games or free to play titles (like Fortnite) there's no virus and "can" not be a virus, at least I've never seen it. Of course, the developer could build a virus that would be the downfall of the company, both financially and legally.
In illegal games that can be cracked quite a virus can be there. Then there's no virus in the game itself but in the crack, keygen or whatever is used there's a virus in it.
You can become addicted to gambling, but that's not a viral infection. The long stay in evenly heated rooms with dry air, and with insufficient movement, weakens the immune system, so it is much easier to contract a rhinovirus infection ("common cold"). In that sense: indirectly yes.
Computer viruses:
When playing: not locally anyway, if the virus was not already in the game with it. But game distributors are quick to notice sales slumps when they claim to be viral distributors, and therefore pay attention to what they deliver.
Nothing happens online as long as scripts in the games have no way to write any files.
After all, something can happen in the background, but that can always happen when you're on the Internet.
The reasoning is similar to scratching the paint while driving a car. Not impossible, but with the usual caution largely avoidable. And essentially regardless of whether you are traveling alone, have passengers or transport luggage.
The game is mostly free