-t is used when the base word ends in a consonant, for example:
* act + -tion = action
* create + -tion = creation
* predict + -tion = prediction
-s is used when the base word ends in a vowel, for example:
* invite + -ation = invitation
* celebrate + -ation = celebration
* communicate + -ation = communication
It's important to note that this is a general rule, and there are exceptions. Some words have irregular formations, and the prefix may not always follow this pattern.