SSN is used for tax declaration, and SSN can be used for credit card loans. With SSN, others can track your credit history.
For example, if you want to apply for a credit card of Chase, you need to fill out an application and need ssn. With your social security number, the bank can check your credit history. If your record is not good, it will not approve the card. If it is good, it will be approved. The amount of the card is directly proportional to the credit history and income. In renting a house in the United States, especially in new york, credit records are particularly important. Without it, others may not rent the house to you. Without ssn, no credit record can be established. By the way, you can't work without ssn in America.
As for how to apply for ssn, the easiest way is to apply for a green card, which will naturally be provided to ssn.
Second, students should be easy to do ssn. If you work in a school, you can apply for SSN with your I20 passport and iss signature. You can also apply for opt after graduation and use opt as SSN.
As for non-students who get ssn without a green card, I don't understand.