In my opinion, it is first and foremost their people's willingness to fight for their freedom and, as we have seen, sacrifice everything. Homes, property and lives.
Another critical element has been the inability of Russia to control the airspace over Ukraine. Through a combination of the Ukrainian Air Force and their air defense missile systems they have denied Russia the control of the airspace above the battlefield and over the Ukrainian logistics system.
All the war material that the United States and other nations are providing to Ukraine have to be transported to the front lines. That equipment and supplies travel primarily by rail and road, once they get to Ukraine.
Without Ukraine being able to contest the airspace and deny the Russians control of the airspace, the outcomes we've seen so far could not have been achieved.