If you're asking why there were no follow-up attacks on Pearl Harbor and Taranto, both of these areas were exceptionally well-defended by shore defenses and the success of the air raids was heavily dependent on surprise. The Japanese tried to bomb Pearl Harbor in March 1942 with Kawanishi H8K, but the operation was a complete failure. In the case of the Italian fleet, the relative lack of British carrier raids on Italy was a reflection of timing. As the Germans reinforced the Mediterranean with Fliegerkorps X in 1941, an airwing specializing in coastal operations, it became much riskier to operate in the waters around the peninsula. The expansion of the war in the Pacific further stretched the British carrier force, and so it could not operate in a concentrated form until 1942, by which time fuel shortages had bottled up the Italian fleet and British naval power was needed in North Africa.
As for the wider question of why no other attacks like Pearl Harbor elsewhere, well, there were major carrier attacks like it during the war. Four Japanese carriers from strike force that bombed Pearl, Kido Butai, attacked Darwin in February 1942 sinking a umber of merchant ships in the harbor and damaging the Australian port's facilities. Kido Butai also raided the Indian Ocean in April 1942, attacking the RN port of Colombo in Sri Lanka.
The growing concentration of American carrier airpower led to American carrier raids in the SW Pacific in 1943, the November 1943 raid on the Japanese naval base complex at Rabaul seriously damaged several Japanese heavy cruisers that were threatening Allied landings in the Bougainvilles. USN carrier raids were a cornerstone of its central Pacific drive with Operation Hailstone, the air raid on the IJN anchorage at Truk Lagoon, being its centerpiece. The Truk raid, called Japan's Pearl Harbor sunk over a score of merchant ships and several IJN escort warships. The IJN's heavy units had relocated out of Truk a week before Hailstone and relocated to the sources of Japanese oil in SE Asia ir the Home Islands.
The escape of the IJN's heavy units from Truk underscored the difficulty of capturing a carrier strike force of being in the right place and time to bring overwhelming airpower against a harbor. Such concentrations of carrier power made it difficult to achieve surprise, especially if the enemy retained a degree of mobility. The July 1945 carrier attacks on the Home Island ports Kure underscore how much easier it was to destroy an immobile opponent. These carrier attacks sank most of the remaining IJN surface fleet, much of it had been reduced to immobility by the blockade of the Home Islands. Although the IJN had augmented the harbor defenses, the USN had brought such overwhelming force to the Home Islands that the AA and few Japanese aerial assets like the 343rd Naval Air Group (which was a special unit composed of the IJN's surviving aces flying the IJN's most advanced shore-based fighter) could only make dents in the American attacks. As with Hailstone a year before, American qualitative and quantitative superiority ensured the USN was able to mount multiple airstrikes on their targets over the course of several days, which stood in contrast to the Kido Butai's attack on Pearl, which limited itself to just two airstrikes conducted in the morning.