i struggle with it a lot tbh , the biggest way i can tell memories from imagination is if i have any feelings attached to it.
when i was trying to kinfirm my gyarados kin i couldnt really tell if this one thing (a free gyarados being trapped and taken for his scales) was my imagination for an oc idea or memories. it was my imagination , as i didnt have any feelings of fear, discomfort, etc. when i thought of it, unlike when i think about performing at a circus which i have feelings towards ( i enjoy the thoughts of performance and when i think of the mistreatment i get negative feelings of discomfort)