Get specific item in page collection

I’d like to target specific items in a page collection.
e.g. I only want {{p.title}} from the first item, then the second in another part of the page, etc. How would I target a specific item?
Here’s a snippet:
{% for p in page.collection %}

{{ p.title }}

{% endfor %}

There is several way to achieve this. with {{ loop.index }} you can get the current iteration, example:

{% for p in page.collection %}
{% if loop.index == 1 %}
<h1 class=“product-family”>{{ p.title }}</h1>
{% else %}
<h2>Do something else</h2>
{% endif %}
{% endfor %}