Iran has been praying and planning for moments like these for decades. The Syrian war was an enormous opportunity for the Iranian military, in a single nation (Syria) you had F22s, SU57s, F35s flying in a single airspace, they had the chance to test their missile capabilities from their country and were able to test their air space defence system without direct conflict. Alarm bells should have ran in 2006 when Hezbollah struck an Israeli warship.
If Hezbollah was capable of this in 2006, whilst being a militia with an estimated manpower of 20-50k. Imagine the ability of an 80 million strong united nation such as Iran with immense natural resources, advance scientific and technological sector, advance space program, advance nuclear program with a well-educated population. Iran can and will sink those carriers if necessary.