The main difference between cannabis and tobacco is that one is addictive and encourages you to engage in the habit ten or twenty times a day.
Setting plants on fire and inhaling the smoke causes cancer. Doesn’t matter much which plant, though there’s surely some that are worse than these two. Neither one is good for you.
Of course, cannabis is often consumed in other forms (edibles, vaping, etc.).
But it’s the ROA with these two plants that cause the most problems. And outside of frequency of use they’re both carcenoginic.