We do not know exactly how the hijackers gained access to the cockpit; FAA rules required that the doors remain closed and locked during flight.
It is well known how the hijackers were able to gain access to the cockpit.