I know launching a squadron of planes from a WW2 era aircraft carrier took about 45 minutes to an hour. What exactly did say the first or second plane do while the rest of the formation were launched? Wouldn’t the first plane have less fuel compared to the last plane? What did they do to mitigate this?
Generally speaking, it took only a short while to launch a single range of aircraft - in other words, all the aircraft that could be fitted onto a carrier's deck. During the Raid on Taranto, the first aircraft of the first wave took off at 20:35. The last of the twelve aircraft of the first wave left the carrier by 20:40. This was not long to wait at all, so aircraft could orbit the carrier and wait for the last aircraft to take off. However, most strikes required more than a single range. This was where the delay came in. Aircraft engines needed time to warm up to operating temperature, getting the oil to the proper consistency for maximum power. This could only be done in well-ventilated spaces. On British and Japanese carriers, the only such spaces was the flight deck. American carriers, with open hangars, could launch multiple ranges more quickly, as their aircraft could do some warming up in the hangar.
What the first range of aircraft did while they were waiting for the next range to launch depended on doctrine and tactical factors. One option was for the first range to set off for the target as the next strike was brought onto the deck. This was the option the British followed at Taranto. As described above, the first range set off almost immediately after the last aircraft launched at 20:40. The next wave began launching 40 minutes later, at 21:20, and headed to Taranto slightly later. This had the advantage of wasting as little time and fuel as possible, but left the strike waves in poor cohesion - it was only really feasible against targets unprotected by fighters.
Another option was for the first range to orbit around the carrier until the second range had taken off. This delayed the strike and wasted fuel for the first aircraft, but (in theory) kept the strike as a cohesive whole. To limit the effect of the wasted fuel, a carrier commander could choose to launch their longer-ranged aircraft first, with shorter-ranged aircraft in the second range. At Midway, Enterprise took this option. Her captain chose to launch his long range dive bombers first, following them with short range fighters and torpedo bombers in the second range. Unfortunately, the second range was heavily delayed; the dive bombers ended up proceeding alone to the target. Hornet took the same option, but her captain mishandled it. The fighters were launched in the first range, along with the dive bombers, while the torpedo bombers formed the second range. This contributed to the loss of a number of Hornet's fighters to fuel exhaustion.
A third option was to combine the two, sending slower and shorter-ranged aircraft towards the target in the first range, while faster aircraft orbited to wait, or just formed the second range. Yorktown took this option at Midway. Her first range contained a combination of dive bombers and torpedo bombers. When it was launched, the torpedo bombers immediately began heading towards the Japanese carriers, while the dive bombers waited. The second range consisted of the fighters; once launched, they combined with the dive bombers and began heading off behind the torpedo bombers.