i haven't tried it but i've heard that if you use a marker to draw a dot on your hand or something similar and keep looking at it and reminding yourself that you are in fact awake that it won't be there in the dream and you'll realize it's a dream
idk if that'd really work though, and i'm probably leaving out details but eh
i've had lucid dreams before but only accidentally, and then i don't know what to do in them because i wake up before i decide on what to do
EDIT: there are a bunch of other ways that i can't remember but you can probably find them by just googling "how to lucid dream" or something, sleep paralysis isn't the only way