By now, everyone knows we have an account of Joseph referring to Cumorah before he even got the plates, which indicates he had to have learned the name from Moroni (or Nephi, who also visited him). Parley P. Pratt explained that Moroni anciently called the hill in New York by the name of Cumorah.
The question arises: when did Moroni tell Joseph the name of the hill?
Apparently this occurred during the night of Moroni's first visit
Lucy Mack Smith recorded a little-known account of what Moroni told Joseph Smith, including the identification of Cumorah. The detail in it suggests credibility and reliability. [editing marks removed]
[Moroni, after telling Joseph about the record, said] but you cannot get it until you learn to keep the commandments of God For it is not to get gain. But it is to bring forth that light and intelligence which has been long lost in the Earth
Now Joseph beware or when you go to get the plates your mind will be filled with darkness and all manner of evil will rush into your mind. To prevent you from keeping the commandments of God that you may not succeed in doing his work and you must tell your father of this for he will believe every word you say.
The record is on a side hill on the Hill of Cumorah 3 miles from this place. Remove the grass and moss and you will find a large flat stone pry that up and you will find the record under it laying on 4 pillars of cement— then the angel left him.
https://www.josephsmithpapers.org/paper-summary/lucy-mack-smith-history-1844-1845/41
Here we see Moroni referring to the hill by name and specifying its location. He told Joseph he'd have to remove the grass and moss, which is a significant detail because it helps explain why the stone had not been removed in the centuries since Moroni first put it over the stone box.
This account is from the version of her history that Lucy Mack Smith dictated to Martha Coray. The 1845 version, created by the Corays from Lucy's original version plus additional material (see the historical introduction), omits these paragraphs without explanation. In this section on Moroni's visit, they incorporated the History of Joseph Smith that was published in the Times and Seasons in lieu of Lucy's description of the visit.
https://www.josephsmithpapers.org/paper-summary/lucy-mack-smith-history-1845/89
Some people think Lucy conflated the First Vision with the visit of Moroni, but when we read her original version (the 1844-1845 draft), it is not inconsistent with Joseph's accounts.
Joseph's 1832 history relates that he "called again" the night when Moroni appeared and that, once again, the Lord had forgiven him his sins.
it came to pass when I was seventeen years of age I called again upon the Lord and he shewed unto me a heavenly vision for behold an angel of the Lord came and stood before me and it was by night and he called me by name and he said the Lord had forgiven me my sins and he revealed unto me that in the Town of Manchester Ontario County N.Y. there was plates of gold upon which there was engravings which was engraven by Maroni & his fathers the servants of the living God in ancient days and deposited by th[e] commandments of God and kept by the power thereof and that I should go and get them and he revealed unto me many things concerning the inhabitents of of the earth which since have been revealed in commandments & revelations
https://www.josephsmithpapers.org/paper-summary/history-circa-summer-1832/4
Some scholars think Lucy was confused by the allegedly false tradition about Cumorah that arose among the early Latter-day Saints. Such an interpretation is not driven by historical evidence; instead, it is driven by their ideological opposition to the idea that the hill in New York was the Cumorah of Mormon 6:6.
Occam's razor* would lead us to the simplest explanation; i.e., that Moroni did tell Joseph the name of the hill near his house was Cumorah, and that is the source of all the subsequent teachings about the New York Cumorah.
_____
*Occam's razor: a scientific and philosophical rule that entities should not be multiplied unnecessarily which is interpreted as requiring that the simplest of competing theories be preferred to the more complex or that explanations of unknown phenomena be sought first in terms of known quantities
https://www.merriam-webster.com/dictionary/Occam%27s%20razor
__________
It's also interesting to see how various artists depict the stone box on Cumorah.