Is it frowned upon to obtain a recommendation letter from a recent Ph.D. graduate? Like many other students in a lab where interaction with the lead Professor is very limited, most of my time is spent with the graduate student who is working on their dissertation/publication project.

This student is a Ph.D. candidate (Ph.C.) and will have their degree by the time I apply to graduate school. Whether they will secure a faculty position or post-doc somewhere is unknown, but my question is whether it is okay to ask them for a recommendation letter since they will have earned their doctorate degree by then, despite having worked under them when they, themselves, were still students.

Will this be frowned upon by the admissions committee?

*This is for Social Sciences
I wrote one or two recommendation letters as a graduate student, though only after encouraging the students to find someone else if at all possible.

My experience is in math, which may be different, but it's been that a letter from a PhD student counts for somewhat less. Prestige of the letter writer matters a bit, as does experience, and a PhD student generally doesn't have either.

It would be common in your situation, I think, to have the lead faculty member write the letter, but consult with the PhD student about what to say. (Or even to have the PhD student write portions of the letter and have the lead faculty member complete and sign the letter.)

When students have done a research project but the supervising faculty member doesn't write a letter, that can be a red flag. A letter from a PhD student helps, especially if it explains that they did most of the supervising, but it still raises questions.