It can be perfectly safe to work out while babywearing but check first to see if your gym permits it. Some gyms welcome new mothers wanting to take their babies to the gym, while other gyms have a strict no-kids-of-any-age policy.
Also, make sure the sling or wrap you’re wearing is safe for workouts with the baby!