(as of 2021) As soon as you sign your contract, you may or may not get a preliminary 13-digit social security number (numéro de sécurité sociale) mentioned on it. That is practically useless and is only needed in order to generate your payslip. You will have to apply for your own number and it will take time, and the time/documents needed will also depend on your nationality.
In general, a good advice (according to Sharbatanu Chatterjee, who followed these procedures during the troubling era of confinement in the autumn and winter of 2020-2021) is to register at the Welcome Desk Paris, which hosts sessions (online or //sur place// at the Cité Universitaire) in both English and French in order to help newcomers to Paris, especially foreigners. The Cité Universitaire also hosts this website : Access CIUP, where you can get all the information in English and French on social security, visas, etc. Another website which offers very good detailed explanations of how to live as a foreigner in France is the Euraxess website.
To get yourself registered to the French healthcare system, the steps to be followed are mentioned in here. Note that, if you are a EU citizen, a lot of things become easier, you do not have to get officially translated birth certificates, etc. For a non-EU citizen foreigner, there are a lot of extra steps to undergo.
For a foreign PhD student with a contract, the specific steps (listed here) are to fill up this form after printing it out, and send it to the address mentioned on the link (ASSURANCE MALADIE DE PARIS, SRI / Travailleur étranger / 75948 PARIS CEDEX 19). The document is also available in English here.
Make sure you give all documents they ask for, and just to be sure, any documents about your visa or identity that you might want them to have. They will for sure ask for your titre de séjour (residence permit) which mentions the words « passeport talent » (which is usually not mentioned on your « récépisse » or « Autorisation provisoire de séjour (APS) » that you might get while you wait for your titre de séjour) so it's best if you have your titre de séjour before you apply for this.
Once you have sent all your documents (to a special address for postdocs/PhD students with the « passeport talent » visa), it is simply a game of waiting. Often, you will be first given a temporary number that starts with a 7, in a couple of months. You cannot open an Ameli account (this link is for Paris residents) with that, nor get reimbursed online. What you should do once you get the temporary number is :
You should automatically get your permanent social security number a few weeks after getting your temporary number via mail. With that, you can :
Once you get the Carte vitale, you can go paperless and use the French social security system. It is suggested to get a « mutuelle » or a supplementary health insurance that covers those things which the default national health insurance does not cover. Various suggested companies can be found on the Access CIUP website mentioned above.
The total time, from application via physical paper to getting the Carte vitale in one's hand can take several months. For example, for Sharbatanu Chatterjee, a non-EU (Indian) citizen, it took ~11 months, but this was during a pandemic and many confinements. It always helps to call the Ameli numbers (they have French as well as English helplines) and ask for updates, they are usually helpful though you might have to wait for a while. Some English pages are also available on Ameli English pages.
NB : It is also adviced to keep a copy (digital or photocopied duplicate) of any form you send to any bureaucratic institution in France, for one's personal record.