You’ve made some good digging to understand what code you might need but the code is flawed. Let’s break it down.
{% for collection in collections %}
{% if collection.title == product.vendor %}
{% assign brand_link = collection.url %}
{% break %}
{% endif %}
{% endfor %}
Depending on how many collections you have that loop will not cover everything. There’s a max limit to the amount of collections you should expect to get returned in a Collections drop (1000). Looking at the shop noted in your image you are likely hitting that. Your /collections page shows the max of 1000 collections so guessing you have far more than that.
And knowing the collection starting with W is one missed and K is not it does add some weight to my assumptions here.
What this means is the loop is stopping before it’s look at every collection. By the time it gets to this code…
It’s a very inefficient loop in any case so there’s a better way to do it.
If your vendor name handleized matches the collection name handle you could just reference the collection directly, grab the url, and skip the loop entirely.