In Genesis, God shut Noah into the Ark after Noah and his household entered it. Genesis 7:16 says that the animals entered in pairs and that the LORD shut Noah in.
The detail places the final closing of the vessel under divine action rather than describing Noah, Shem, Ham, or Japheth fastening the door. Genesis had already mentioned a door in the ark's side, but it does not describe a human locking mechanism or give engineering details for it.
Later visual retellings frequently show Noah closing a massive door while people outside watch. That is a dramatic artistic choice, not the specific wording of Genesis. The passage's emphasis is theological: Noah's household is enclosed and protected as the flood begins.