Just had this exact same issue occur after Apple Support had me log out of my iCloud account on my iPhone 12 Pro Max. To solve this, all I did was go to:
Settings > Messages > then toggle off and back on the "iMessage" toggle at the top.
After turning it iMessage off and back on, I went back to the Messages app and all messages appears instantly. Hope this helps!
I am/was currently running iOS 14.7.1.