In principle, you can use one-hot vectors and add them. This is the most basic Bag-of-Words (BoW) model. If you use word embeddings, but you to have average them and not just add them. I’ve tried both approaches on simple dataset for educational purposes, and not surprisingly, the word embedding approach works a bit better. But there’s never any harm to try both and see.
The “problem” is that both are BoW approaches, and you loose any information that stem from the sequence of words. Therefore, RNNs (e.g., LSTMs and GRUs), CNNs or Transformers are more commonly used approaches. Here, you commonly have to make sure that all sentences (at least within the same batch) have the same length. Just look up “padding” of sequences. In a nutshell, you introduce a special word (index) to fill up shorter sentences. For your case, for example:

word1 word2 word3 word62
word5 word1 word2 word0


0 is commonly used as index to represent the padding token.