In the NKJV there are footnotes which indicate that Hebrews 12:21 is a quote from Deutoronomy 9:19 but there seem to be some differences there.
Hebrews 12:18-21 NKJV.
18 For you have not come [g]to the mountain that may be touched and that burned with fire, and to blackness and [h]darkness and tempest, 19 and the sound of a trumpet and the voice of words, so that those who heard it begged that the word should not be spoken to them anymore. 20 (For they could not endure what was commanded: “And if so much as a beast touches the mountain, it shall be stoned [i]or shot with an arrow.” 21 And so terrifying was the sight that Moses said, “I am exceedingly afraid and trembling.”)
Deutoronomy 9:18-19 NKJV
18 And I fell[e] down before the Lord, as at the first, forty days and forty nights; I neither ate bread nor drank water, because of all your sin which you committed in doing wickedly in the sight of the Lord, to provoke Him to anger. 19 For I was afraid of the anger and hot displeasure with which the Lord was angry with you, to destroy you. But the Lord listened to me at that time also
In the book of hebrews it seems Moses's fear emanated from their first meeting with presense of God when the mountain quaked and shook. In the book of Deutoronomy it was after Aaron had built a golden calf that Moses was now afraid of God.
How can we reconcile the above texts?