You are using a val which can only be set to a value once, instead of a var which allows the value to be updated multiple times.
OPTIONAL: instead of this:
val textX = remember{ mutableStateOf("Text")}
Use the by setter:
val textX by remember{ mutableStateOf("Text")}