Just as Moses and Elijah were leaving, Peter said to Jesus, "Let's make three dwellings--one for you and one for Moses and one for Elijah. We suspect that Peter wanted to hold on to the moment so that they could revisit the experience. Or, we can suppose that he wanted to mark the place so that others coming after them could see where this event had happened.
While he was still speaking, a cloud came and overshadowed them, terrifying them. They had been able to see Jesus in a new way. They had been able to see Moses who had led the people to the Promised Land, and Elijah who had spoke the words of the Lord to the people facing exile. Now they could see no longer.
In their Preaching the Gospel, Allen & Williamson point out that a cloud is
a traditional Jewish way of representing the divine presence (see e.g., Exodus 13:21; 16:10; 19:9; 24:15-18; 40:34; 1 Kings 8:10-11; 18:44-45; Ezekiel 10:3-4; Psalm 18:11).
This loss of vision terrifies them. Then from the cloud comes a voice.
They could see things that no one had seen before. They could see nothing. Then they learn more.
A voice comes from the cloud announcing "This is my Son, my Chosen; listen to him!"
Luke tells us that they didn't immediately tell anyone what had happened.