Working out should be fine if your symptoms are above the neck and you feel up to it.
Below-the-neck symptoms, however, are a sign your body needs rest.
This article discusses whether or not you should exercise when you are sick.

Corey Jenkins / Getty Images
If you’re fatigued and feeling rundown, let your body rest and recover before you begin exercising again.
The intensity of the workout is also something to consider.
When you have a fever, you’re likely to be contagious.

It depends on the key in of cough and your other symptoms.
Working out with a phlegmy cough is different than lifting weights with a mild and dry cough.
According to conventional advice, the neck check applies:
A heavy cough interferes with your ability to breathe.
A workout that raises your heart rate requires more oxygenand that’s difficult to do when you are coughing.
If you decide to run with a cough, listen to your body.
If you struggle to get enough air, take a break.
Your body needs rest to heal.
When in doubt, check with your healthcare provider.
Running With a Runny Nose
Congestion and runny noses are above-the-neck symptoms.
You should still be able to exercise with a head cold, provided you do not have other symptoms.
What If You’re an Athlete?
Therefore, the intensity of your workout should be lower because of reduced resources your body has for exercise.
Your threshold for stopping exercise should also be lower.
Summary
Whether you should exercise when you’re sick depends on your symptoms.
Symptoms above the neck are usually OK to work out with.
Body-wide or below-the-neck symptoms, like fever and cough, indicate your body needs rest.
If you aren’t sure, check with your healthcare provider.
Weidner TG, Sevier TL.Sport, exercise, and the common cold.J Athl Train.
American Lung Association.Can You Exercise with a Cold?
Dick NA, Diehl JJ.Febrile illness in the athlete.Sports Health.
2019;8(3):201-217. doi:10.1016/j.jshs.2018.09.009