How to spell words with ie or ei:
When the sound is ee it’s i before e except after c
For example, ‘believe’ has the sound ‘ee‘ so its i before e.‘Receive’ has the sound ee but it is after a c, so it is e before i.
Words like ‘weight’and ‘height don’t make the sound ee, so the rule doesn’t apply.