Is for a preposition?

Yes, for is a preposition (e.g., “I bought this card for Ellen”).

The word “for” can also function as a coordinating conjunction meaning “because” (e.g., “I did not doubt him, for I knew him to be an honest man”).

QuillBot’s free Grammar Checker will help you to use the preposition “for” correctly in your writing.