Best way to take the ferry from Portsmouth?
Tempted to answer literally: "duh, best way to take the ferry is to take it". Best way to get to Portsmouth is by train. plenty of frequent local trains, no need to buy tickets in advance. This will need taxis both ends (Southampton docks to Southampton station, and Portsmouth station to ferry terminal). If you have time, plenty to see in Portsmouth.
There are multiple ferry routes from Portsmouth to France: Le Havre, Caen, Cherbourg and St Malo. All operated by the same company. Details and booking here: https://www.brittany-ferries.co.uk/ferry-routes/ferries-france/portsmouth-france
You need to choose an overnight sailing with cabin(s). This will not be the QM2 - it will be a lot more utilitarian, most passengers will be drivers, lorry (truck) drivers and families.
Can we get away without renting a car? How would we get from the ferry to Bayeux?
Caen is nearest to Bayeux. However I recommend hiring a car, which may be easier in Le Havre or Cherbourg. The beaches are over a large area, it is rural with little transport. Taxis for trips of 10's of Km will cost €€€. A car allows you to stop off and view what you want. Yes, a series of guided tours from Bayeux is an opinion, which can be enhanced with 1 or 2 days with a car for other locations.
You need to do some research on the D-Day locations, as they are spread out over a large area.
P.S.: Also need to factor in, where are you going after Normandy and by what mode of transport?