No - not really. It seems to be rather variable, depending on the disease in question.
Cannabis use was associated with much lower rates of COVID-19, for example: https://pubmed.ncbi.nlm.nih.gov/35007072/
It also seems to play an interesting part in inflammatory response (cannabis use is associated with anti-inflammatory agents) - which may or may not matter, depending on the disease. Ex - there are limited studies on cannabis and the impacts on the immune system in HIV patients, with most showing no effect, but the studies are very limited, and often flawed (https://www.ncbi.nlm.nih.gov/books/NBK425755/)
Basically - We don't know shit because of how the US scheduled the drug, and the near complete lack of decent research on it over the last 50 years.
I would still say inhaling smoke of any kind is almost certainly not good for you, but we have a real lack of data here... which is a shame.
The more interesting matter is what effect cannabis might have when it isn't smoked.
I do think the mixed findings around the immune system need a lot of work right now. We're basically 50 years behind where we should be - Given that the original comment I responded to is not entirely wrong either, we do have some evidence that cannabinoids suppress the immune system in helpful ways for some autoimmune diseases (such as Crohn's/IBD) which I believe is why there was interest in evaluating the impact in HIV patients, where the results were inconclusive.