Let me introduce how to write Immigration card when you enter Thailand.
Immigration card has two parts, Arrival (front & back) and Departure card.
You can fill up both parts in the airplane.

In the immigration booth, the officer will take the arrival card
and will give you Departure care in your passport.
When you leave Thailand, you should submit the Departure card to the immigration.
Don't worry, It's not so difficult.
If you need, you can ask the air crew to help.
Welcome to amazing Thailand.