A resignation letter is a record, not a debate. It needs to state that you are leaving and when, and it helps to thank the people who earned it and offer a sensible handover. Everything else is optional.
The decision and the date.
State that you are resigning from your role and give your final working day in the first two sentences.
Genuine thanks.
Mention something specific you valued: a project, a mentor, a skill you gained. Leave it out if it would not be true.
Handover.
Say what you can do before you go: document your work, finish a project, or help train a replacement.
How to reach you.
If you are happy to answer questions after you leave, say so and close politely.