There’s an outdated rule in English that states you shouldn’t end a sentence with a preposition. It dates back to a time when writers applied Latin’s grammatical rules to English. It’s mostly ignored now.
English has no rules like that, only preferences.