As long as your visa is not territorially restricted (for type C visas, no other restrictive remarks other than "ETATS SCHENGEN" in the "VALID FOR" field), it is fine visa-wise.
However, United Kingdom is currently considered to be a high-risk country by the SEM. You must be vaccinated (with any WHO-authorized vaccines) to transit through Swiss territory in this case.
Unlike the EuroAirport in Basel where you could choose to exit through French immigration and customs, there is only Swiss immigration in Geneva and all Swiss Covid rules apply.
Transit from a third country considered by the SEM to be high-risk to
a Schengen state
Third-country citizens holding a residence document
or a visa type D for their destination country in the Schengen area
are permitted to travel through Switzerland to that country. The
normal requirements for entering Switzerland apply.
It is only possible to enter Switzerland from a high-risk country in
order to travel on to another Schengen state for a short stay of up to
90 days if you can prove that you have been vaccinated (see “How can I
prove that I am vaccinated?”). Persons under 18 may enter Switzerland
if they are travelling with an adult who has been vaccinated.
Otherwise the normal requirements for entering Switzerland apply.
If you have not been vaccinated, but your destination country in the
Schengen area has authorised your entry for a short stay of up to 90
days, you may only enter the Schengen area by travelling directly to
your destination country (i.e. you may not travel though Switzerland).
https://www.sem.admin.ch/sem/en/home/sem/aktuell/faq-einreiseverweigerung.html#2005127624
(The last paragraph just means you cannot transit through Switzerland, not that you can only take a direct flight. If another Schengen country allows such transit, Switzerland doesn't care.)