Which wires of a light fixture are supposed to connect to the black, the white, and the bare (or green or when no-such exists) wire at the light box?
If there is a bare or green wire in the box, attach the fixture’s bare or green (if any) to it, otherwise leave the fixture’s alone. If the other wires of the fixture are black and white, connect them each to the same color wire in the box (but if a single red is waiting in the box, attaching the fixture’s black to it and not to the blacks in the box is probably the right move). If the fixture’s two non-ground wires are not black and white but one of them is smooth and the other has a “ribbed” texture, the ribbed is to connect to the white of the box and the smooth to the other. But if the fixture’s wires fit none of these descriptions, one of the two should be a solid color (it connects to the hot; except if it is solid white, connect it to the white) and the other should have striping or lettering on it (it goes to the white neutral; except if its mate was solid white, this striped one goes to the black or red). Is everything clear?