@zahra_hematy,
The generator wants to maximize the value the discriminator predicts for fake images. The larger the prediction, the more real the discriminator thinks the image is, which is what the generator wants. But when we talk about loss, a smaller loss is better, which means the larger the discriminator’s prediction, the smaller we want the loss to be. That’s why we take the negative.