I was told that I was born with a cervical rib recently.

I am curious to know the link between cervical ribs and human evolution and the purpose cervical ribs had in terms of evolution.

cervical ribs are developmental abnormalities that are not normally inherited and thus occur just in the affected individual. Whilst they usually do little harm they have no particular advantage either. Therefore they have no real bearing or "purpose" from an evolutionary perspective.

Note though that some other animals have functional cervical ribs, including birds and crocs. Dinosaurs had them, and in particular some sauropods had immensely long cervical ribs. A single cervical rib of Mamenchisaurus sinocanadorum measures over 4 m in length!