Here is a poem that can help you remember how to spell certain English words.

I before E except after C
Or when sounded as A, as in “neighbor” and “weigh”

In words like “believe” or “pier” the letter I comes before the letter E. However, there are several exceptions which the poem also tells you. After a C, the E comes before the I (such as in “receive” or “deceive”). Another exception is in words where the vowel sound is like “neighbor” and “weigh”. Unfortunately, there are still exceptions to this rule, such as “weird”.