Asking the user’s goal in the Signup or first time Sign in?

I want to qualify users in a SaaS product and understand how to bucket these users into use cases. Still, I wonder what's the best moment to add this question and reducing onboarding friction. Is the user psych any different from the sign-up and first-time sign-in?