As previously said, providing a definitive response to that question is challenging. Without information on the mileage of the automobile, it is possible that the strut may need to be replaced due to rust before it reaches the end of its lifespan. In any case, it is not a significant issue as it is essentially a securely attached component.
The challenging aspect is in the occurrence of body rust at the mounting locations, particularly at the top. (I am uncertain about the Yaris' susceptibility to this issue, since it has been a prevalent problem in other automobiles in the past.) Repairing it correctly might be quite a laborious task. My Carina did not pass its MOT test when it was around 15 years old and had driven 250,000 miles. The failure was due to a problem at the upper part of the rear wheel-arches where the springs are connected. The expense of repairing it would have much beyond the worth of the vehicle, thereby regrettably ending its existence.
Upon inspecting the struts of my 2018 vehicle, I saw no evidence of rust in the area shown in your photograph. However, it is worth noting that the vehicle has only accumulated around 23,000 kilometres, so this may not be representative of the average condition.