Why are there two ways to write Japanese "gifts"

I am a beginner. The second lesson is the word of gift. The eighth lesson also has this word, and the writing is different.