You can use the Trim trailing whitespace feature to ensure that any extra spaces at the end of a text field's value are not saved to Airtable. This feature is turned on by default for newly single line and long text fields, but if you want to turn this on for your existing field, go to:
Your form's fields list
Select the field you want to trim automatically
Go to the Advanced section
Turn on Trim trailing whitespace