Altitude, temperature and even humidity affect the performance of aircraft propulsion systems. I am no longer a pilot, but I can give some background information.
As you noted, air is thinner at higher altitude. That provides less air for an airplane’s propeller to push against. It also provides less air for a helicopter’s rotor to push downward against.
The atmosphere at 18,000 feet is only half as dense as the atmosphere at sea level. Only a few helicopters can fly that high, but many nicer airplanes can fly that high.
To make matters worse, thinner air also provides less oxygen to the engine, so there is less power available, which worsens performance. A turbocharger on a piston engine can rectify all or part of that problem, up to a certain altitude where the atmosphere is so thin that even a turbo can’t find enough air to compress. As a VERY rough estimate, that usually happens at about 20,000 feet.
Cold air is denser than warm air, so that’s a plus. It isn’t a huge difference, but important. Each model of aircraft comes with a “performance envelope” diagram. It is a graph with a polygon area that shows limits on flight for combinations of altitude and temperature. High and hot is a serious limit. Flying out of Las Vegas, Nevada, in a small airplane when the air temperature is over 100 degrees is suspect, especially if a person wants to continue climbing westward to get over the Smith Range.
Humidity doesn’t have much effect on performance, but there is an effect. Humid air is less dense, so it provides slightly less lift than dry air. However, I have not seen a performance envelope graph that takes humidity into account. There may be some that do, but I haven’t seen one.
Finally, with helicopters there is the worry of “settling under power.” When hovering close to the ground, the air pushed down by the main rotor strikes the ground, flows radially outward, then can rise again, get sucked into the void above the rotors, then get forced down through the rotor again to complete the circle. The helicopter is then trying to hover in a column of air that is moving faster and faster downward. The helicopter settles into the ground. I believe that was the explanation for the drop of the Blackhawk helicopter that crashed last Winter on Mount Hood, Oregon, when trying to rescue two or three groups of climbers who had fallen.
To avoid or reduce settling under power, helicopter pilots maintain some forward motion instead of staying in one place when “hovering” near the edge of the performance envelope graph. The helicopter is therefore moving out of the column of descending air.