The cops would arrest Thanos.
Magneto would be dangerous, but they might have a chance via a sneak attack by laser, or kill him with a high intensity gamma radiation source, or high intensity X-ray dosage - since in the real world his magnetic shields wouldn't actually protect him from such things. Or maybe if they ever perfect those X-ray and gamma ray lasers they would have a really good weapon against him.