ーようになる can be used show that a change to a certain state is reached.
I can swim now. (I have become able to swim).
We have learned that よう is used to show similarity, so this usage to show changed state needs some explaining:
In its simplest use よう（な）does indeed show similarity.
People who can swim (people like those who can swim, people such as those who can swim)
The above phrase can put into a complete sentence.
Become a person who can swim.
よう can also modify the verb なる directly, in which case it will take に because it is a な adjective
Become able to swim.