Firstly, you'll need to ensure that you have the appropriate plan as mentioned in this doc: https://support.algolia.com/hc/en-us/articles/4408424688017-Which-plans-are-allowed-to-the-collections-page-feature-
Then, you can enable the collection pages feature as mentioned in this doc: https://www.algolia.com/doc/integration/shopify/sending-and-managing-data/schemas/?client=ruby#collections
After that, the collection-product relationship should be created in the product index. If you want to use it as a facet, you can add that attribute in the attribute for faceting. If you do not see the option present in the attributes for faceting, please contact the Algolia Support team.