For "old" elements (i.e., known / discovered before the advent of a body like IUPAC), there was no uniform and universal rule. You see this heritage by comparison of the name of an element assigned in different languages; languages in neighboring countries may but need not to share their approach. E.g., $\ce{_7N}$: nitrogen (English), nitrógeno (Spanish), nitrogen (Nowegian Norsk bokmal); azoto (Portuguese), azoto (Italian), azote (French), azot (Polish), azotas (Lithuanian), aзо́т (Russian), άζωτο (Greek); stikstof (Dutch), Stickstoff (German); dusík (Czech), etc. for a few examples you may encounter in Europe.
For newly discovered / newly synthesized elements beyond atomic number 100, IUPAC published (back in 1979) a recommendation how to name them systematically. For this you have the roots
0 = nil, 1 = un, 2 = bi, 3 = tri, 4 = quad, 5 = pent, 6 = hex, 7 = sept, 8 = oct, 9 = enn
(Pure & Appl. Chem. 51, 1979, 381-384, open access)
Thus it was until specific agreement that unnilunium ($\ce{_{101}Unu}$) eventually was named mendelevium ($\ce{_{101}Md}$), and IUPAC continues to publish how to name the new elements (example).
Despite this report, however, the roots are neither pure Latin, nor Greek, but convention. Because there no tenners (like decem, vīgintī), or hundreds (like centum, ducentī), etc. Even spelling the numeri only by position, you would expect unus, duo, tres, quattuor, quinque, sex, septem, octo, novem for $1\dots9$ for the former.
For the names eventually adopted, IUPAC set the rules that these
"In keeping with tradition, elements are named after
- a mythological concept or character (including an astronomical object);
- a mineral, or similar substance;
- a place or geographical region;
- a property of the element; or
- a scientist.
[...] The names of all new elements should have an ending that reflects and maintains historical and chemical consistency. This would be in general “-ium” for elements belonging to groups 1–16, “-ine” for elements of group 17 and “-on” for elements of group 18. N.B. The present recommendation is here more specific than that
written in the 2002 document."
(Pure & Appl. Chem., 88, 2016, 401-505, open access)