How can i make a interaction checker if the player has already interacted with A then he can interact with B?

Can you provide more details? Interaction is a bit vague.