Stars are not visible in photos of the Moon –including those taken from the lunar surface— because the Moon is sunlit. The exposure needed to take a photograph of the Moon is not that much different from that used to take a photo in daylight on Earth’s surface.
To demonstrate this, we can try taking a picture of the Moon with stars visible, on the conditions: 1. The lunar features, like the craters, are correctly exposed, not overexposed. 2. Taken in a single exposure, not HDR, and not the result of editing. Even if we are using the best camera available today, the stars can’t show up in large enough quantity.
Cameras have dynamic range limitations. The best camera today can only correctly expose parts of the scene, having the range between the darkest parts and the brightest parts at most about 14.8 stops. In other words, the brightest parts can only be captured by camera only 2^14.8 = 28500× brighter than the darkest parts. Anything beyond this range will appear pitch black (underexposed) or bright white (overexposed), without any visible details.
The sunlit surface of the Moon is far brighter than any stars, outside the capability of any camera to record them both in a single exposure. A photographer can take a picture of the lunar surface, but he will have to forego the too dim stars. Or he can set his camera to take a picture of the stars, but then the lunar surface will appear bright white, or overexposed.
The same thing happens with pictures astronauts took on the surface of the Moon. Their cameras were set with the exposure suitable for taking pictures of the lunar surface. It is the reason stars are not visible. If they want the stars to appear, then they need to increase the exposure. The stars will appear, but the lunar surface will appear bright white without any detail.
Flat-Earthers are keen to accuse that a picture is a fake only from the fact that stars are not visible. We can respond to such accusations by challenging them to take a photograph of the Moon with visible stars according to what is explained here. If they cannot provide the intended result, then they are not in the position to complain. By complaining, they are also accusing the pictures they took themselves are fake, too.