What is the best way to get from Bayeux to London?
What is your definition of "best"? Do you prefer fastest, cheapest, or some other characteristic? Connections between Normandy and London are not as convenient as one might like. The usual recommendation is to take the train to Paris and then the Eurostar train to London. If you buy tickets early enough (committing to a specific date and time), they are not grotesquely expensive. Bought close to departure date, the cost could be really painful.
I did this a few months ago but the other way:
Train from Bayeux to Paris St. Lazare.
Taxi or Metro from St. Lazare to Gard Du Nord.
Eurostar to London.
Simple.
Skyscanner, a useful site for inter-European hops, shows several flight connections from the Caen airport to London. No non-stops; Lyon appears to be the transfer on several offers. Think 5-6 hours total along with the usual procedures at beginning and end.
The absolute shortest flight from Caen to London is just under 6 hours, 3 segments, and does not account for the time to get to Caen nor the time to get to London from Gatwick (and arriving at LGW 11 PM). Others will be longer (a lot longer), and pricey (that "short" on his $350). The train from Bayeux to St. Lazare is 2' 20". It is 20-30 minutes to Nord depending on travel method (we walked it with backpacks), allow an hour ahead for boarding procedures for Eurostar, and 2" 15" transit. And you are in Central London as opposed to still top to an hour away. Reasonably in advance this should be under $100.
I thought there was a ferry from Ouistreham (near Caen) to Portsmouth, with train to London, but I couldn't find that route on Rome2Rio. I'm sure it would have been slower and more weather-dependent than the train combination already suggested -- train to Gare St-Lazare, Metro or taxi to Gare du Nord, Eurostar to London. That seems like your best bet cost-wise and time-wise.
I thought there was a ferry from Ouistreham (near Caen) to Portsmouth,
with train to London, but I couldn't find that route on Rome2Rio.
There is. Rome2Rio should be taken with a grain of salt. https://www.brittany-ferries.co.uk
+1 for Dick. I'd also point out that St. Pancras Station is a superb job of adaptive reuse of an obsolete building. Do not waste time romanticizing ferries. Their time is past. And their ... digestive distress bags.