McCain was of the most respected people in Congress. Not just by Republicans ,but by Democrats as well. Trump didnt like him because McCain questioned his policies, and expected him to actually know what he was doing. And the other Republicans fell in line with Trump because they were all coward who wer afraid of losing votes by opposing Trump.Hell even his fellow Republicans disliked McCain, he was a backstabber.
Then you had the thing where Trump said he had no respect for former POW's because they were stupid enough to get captured, which is what drove McCain completely against Trump and made him stop trying to work with him at all