John Fitzgerald Kennedy

Kennedy, John Fitzgerald

Whe we use the last name first, do we have to put a comma?

Yes. We use a comma when we put the last name first.