Were you following the instructions on Apple's site to enable two factor authentication?
Two-factor authentication for Apple ID - Apple Support
If you have a credit card associated with your AppleID and it asked for the CID number, that is just an identification check against the data Apple already has on file with your account.