I had made a comment in another thread that I thought ANSES was where you go to get a CUIL, and I was corrected in a post that came right after. I don't know if that's where you got the ANSES idea, and if so, I apologize for the error.
You need to go to AFIP to get the CUIL. I think you can apply for it online, but not 100% for sure. It seems that one of my bothers-in-law did that a couple of years ago. He was able to print it out and use it for employment until his official document came to him.
However, you need residency to get a CUIL, just to make sure you know. Depending on what you need it for, if you're not a resident, a CDI is probably what you're looking for, used to purchase things like cars, property, etc.