This is the single most common source of confusion for new players. Here's exactly how the coloring works when a letter shows up more than once, and how to use it.
Wordle colors each guessed letter based on how many times that letter actually appears in the answer — not just whether it appears at all. If your guess has a letter twice, but the answer only has it once, only one of your two tiles can turn green or yellow. The other will be gray.
Say the answer is LEMON and you guess LEVEL:
LEMON has exactly one L and one E. Your guess LEVEL has two L's and two E's. The engine matches greens first (the first L and first E line up correctly), then checks if there are any remaining answer letters left to award yellow to the extras — there aren't, since both the L and E in LEMON are already accounted for. So the second E and second L both come back gray, even though "L" and "E" are technically in the word. This is the exact behavior this site's game uses (and matches standard Wordle rules).
Now say the answer is ERROR (which itself has three R's) and you guess RURAL:
Your guess has two R's. The engine checks exact positions first: the second R in RURAL happens to land on a position where ERROR also has an R, so that one turns green. The first R isn't in the right spot, but ERROR still has other R's left unaccounted for, so it turns yellow rather than gray. If ERROR only had one R total and it had already been "used" by the green match, that first R would have come back gray instead — the engine never marks more tiles for a letter than the number of times that letter actually appears in the answer.
It's tempting to assume "gray always means never guess this letter again," but that's only true if every instance of that letter in your guess came back gray. If you guess a double letter and get one gray and one yellow, the letter is still very much in play — just once, not twice.
Play a round and pay attention to what happens the next time you guess a repeated letter.