Rey seems to idolize the Rebels. She pretends to be an X Wing pilot, (donning an old OT era helmet) and has a crude doll of a pilot. She clearly knows something of galactic history. Not to mention the wreckage of a major battle is all around her. There has to be a databank or two she’s found as a scavenger.
Even Luke living on a poodoo hole like Tatooine knew about the Clone Wars.
And Rey knows about Luke but think he’s a myth. The accounts of the Rebellion she has heard are inconsistent to say the least.
EDIT:
I’m glad I’m not the only one who uses the term “poodoo” here outside of the Jabba line 😃