Aggregate all joined rows with where clause
If I understand your requirements, this consists of selecting all the users that have a project in step 3, and using that list to select all the projects for just those users.
Something like:
SELECT ug.id
     , STRING_AGG(DISTINCT p.step_number, ', ') AS summary
FROM user_groups ug
    INNER JOIN (
            SELECT u.user_group_id
                 , u.user_id
            FROM users u
                INNER JOIN projects p ON u.user_id = p.user_id
            WHERE p.step_number = 3
            GROUP BY u.user_group_id, u.user_id
        ) Step3Projects ON ug.user_group_id = Step3Projects.user_group_id 
    INNER JOIN projects p ON Step3Projects.user_id = p.user_id
GROUP BY ug.id;