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.