S-400 is mainly a long range anti-air weapon. Although its target list includes strategic cruise missiles like Tomahawk but in all fairness, these missiles are quite difficult to detect and can fly under the radar literally meters above the ground and with terrain hugging feature can avoid any obstacles, very hard to tackle with such long to very long range systems. Here, this is about Babur missile but will give some idea of this missile's capability. Even Babur is hard to handle with such systems (technologically speaking)
https://defence.pk/pdf/threads/babur-cruise-missile-database.185609/
Pantsir is more of a point defense system and it a last moment defense mechanism against exactly this kind of weapons. However due to its short range it can defend only the point where they are deployed. We are not sure that target hit by the US missiles was actually guarded by Pant sir system or not.