Sometimes. A few examples of chronic health conditions where a person can be immunocompromised include:
diabetes
autoimmune disorders like lupus and rheumatoid arthritis
human immunodeficiency virus (HIV) infection
chronic kidney disease
inherited immunodeficiency disorders