To get an access on your Ameli account, you first have to be registered with the Assurance Maladie (Health Insurance) and obtain a permanent Social Security number.
See our related articles
French Social Security scheme for health coverage, general information / Sécurité Sociale (CPAM - Caisse Primaire d'Assurance Maladie)
Comment reconnaître mon numéro de Sécurité Sociale? / How to recognize my own Social Security number?
If your Social Security number starts by 7 (for a man) or 8 (for a woman), it means that it is a temporary social security number.
You can create your ameli account only with your permanent social security number, using the first 13 digits.