How do I make projectiles despawn

More importantly, why ask on a documentation forum?

The correct forum is the Scripting forum. Also, always use code-tags when posting code please. You can also edit your post for this.

Note that C# is case-sensitive. Unity calls a method named “Update” (note the U).

I’ll move your post for you.