Why can't I access my private collection with the laybuy tag?

The issue with your code might be due to the use of curly quotes instead of straight quotes in the condition. Replace the curly quotes (‘’) around the tag value ‘laybuy’ with straight quotes (''). Here’s the corrected code:

{% if customer.tags contains 'laybuy' %}
  {% section 'collection.laybuys' %}
{% else %}
  {{ pages.no-access.content }}
{% endif %}

Make sure to update the code with straight quotes and then test it again. This should properly check if the customer is tagged with ‘laybuy’ and display the private collection if the condition is met. Otherwise, it will display the content from the no-access page.