Did the people of the Mormon religion settle in Salt Lake City in the 1840s?

Yes. The first group of Mormon pioneers arrived in what is now called "Salt Lake City" in 1847. They established the city and surrounding communities, finally far away from the persecution they had faced in the midwest.