That array has 120 elements, that’s it. It’s size is fixed at 120 elements, regardless of which ones have (or have not) been written to.
If you’ve written to 10 of them you will need to keep track of that in another variable.
There’s no way to get it from sizeof() or using any other code.
Show the other code that writes to the elements.
Say how you can tell if an element is “written”. For example does zero indicate an unwritten variable, or do we need to keep track of that separately?
Also if I just write element 5 (without writing any others first), is that one element written, or 6 (i.e. the index after the highest one used).
Edit: If it’s a character string, and it has a NUL (0) terminator at the end, then you can use the strlen(bufferMSGtoClient) function to count up until the NUL terminator. However you data type should ideally be ‘char’ and not ‘uint8_t’ to indicate this.