1650s, "general science or theory of the material universe as an ordered whole," from Modern Latin cosmologia, from Greek kosmos (see cosmos) + -logia "discourse" (see -logy). By 1753 as "the branch of metaphysics which discusses the ultimate philosophical problems relating to the existence of the universe." Related: Cosmologist.
compound adjectival word-forming element, usually interchangeable with -ic but sometimes with specialized sense (such as historic/historical, politic/political), Middle English, from Late Latin -icalis, from Latin -icus + -alis (see -al (1)). Probably it was needed because the forms in -ic often took on a noun sense (for example physic). Forms in -ical tend to be attested earlier in English than their twins in -ic.
Others are reading
<a href="https://www.etymonline.com/word/cosmological">Etymology of cosmological by etymonline</a>
Harper, D. (n.d.). Etymology of cosmological. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/cosmological