You can lift weights at the gym and build your arm muscles, then use those muscles to lift or push other things more effectively, because muscles are general purpose tools.
Most of your immune system is more like a key. It’s specific to one thing. There are some exceptions but overall the fewer viruses you encounter the better.
As for the exercise: yes. There’s already preliminary evidence that exercise is highly coordinated with covid outcomes.