Undergoing cancer treatment makes the body incredibly vulnerable to any viruses or infections including covid. He may have got it in the hospital, I don't think one can accuratly determine what killed him. If he didn't have brain cancer, he would likely not have died of covid.