Yin / Yang is duality.
The concept that many things in life can be seen with two distinct aspects.
So Human -> Male/Female
These pairings are not absolute, rather relative and more of a guideline for spotting patterns.
You can use these patterns to predict and work with life, again not forcing everything to be one thing.. but understanding the relative aspect of life.
The simple answer is this: Yin / Yang is a teaching tool to remember associations. So if a person is in heat use the Yin Herbs to cool them down. If a person is heat deficient then use Yang Herbs to heat them up. If a women is having fertility problems then use Yin herbs to help overcome the issue… ETC
Yin / Yang evolved in an age of verbal traditions and is used as a way to more simply categorize information to work with. In many respects since we have access to so much more information than what a verbal society can contain in memory lists, the concept of yin/yang isn’t as useful today since people tend to get literal and try to make it absolute which breaks it. But is a very powerful memorization tool.
But when learning traditional Chinese medicine or Qi Gong it is still used as a teaching tool to help people remember various teachings a bit easier.