When I started Minecraft : Java Edition, the screen turned black and started flashing. I tried to change video settings but I was not able to see anything. I launched it again without Optifine but it kept flashing. But when I randomly clicked and jumped on to a server. everything went normal. I don't know why does this happen.