Sad news. It can happen anywhere even in the US. The two assassination attempts on the Republican Presidential candidate, Donald Trump, were not carried out by Mexicans but by traditional Americas. You wouldn't generalize that because a mayor was shot by drug cartel, then all Mexicans moving to the US are criminals. There are criminals in all countries of the world, which is why one of the documents for visa application is a police report that shows that such an applicant has no connection with crime.
Oh yes, it's a sad news to experience but the truth remains that this can happen anywhere including in the USA. As a matter of fact, Donald Trump have narrowly escaped murder attempts for the second time which occurred during his recent political campaign rally. There are also incidents of Republican politicians like Scalise Steve who was shot in 2017 and another attack on Pelosi's husband which occurred in 2022. So it will be inaccurate for the OP to make such conclusions yet.
What I can say alternatively is that the political violence in the Mexican country is mostly associated with the drug cartels and other sheddy business umpires thriving in the country. Making it quiet mandatory for politicians in the Mexico country to attach more intelligence to their team and become more security conscious about their dealings because this incident is just a signal to the next occupant of the same position as well as others to not lose their guards.