Conditional for specific page
You could use either  | last filter instead of first or, a combination of first and another conditional ( segments[1] is empty or similar)?
{% set segments = craft.app.request.segments %}
{% if segments | first == “projects” and segments[1] is empty %}
Load scripts
{% endif %}

On phone so ymmv