It's not just "removing light", because if you removed all the light from stars, you would be left with black spots instead of white spots. The stars are bright enough to completely saturate a region of the image sensor. So there was actually no data recorded about what was in that particular part of the nebula or whatever.
The "generative" part is that the algorithm is filling in a plausible guess as to what would have been observed if there was no star "in the way".