I thought it was the fuel pump, so I installed a new one ...
Boat maintenance advice:
Don't throw parts at a problem. That requires trips to the parts store and getting dirty changing them. It is easier to just throw the money over the side.
Test the parts you suspect before buying new ones. Unless you need a spare, your time and money is probably better utilized elsewhere.
Before you pick up a tool, pick up a pencil and paper. Write down the symptoms of the problem. Write down recent repairs or incidents even though you think they may not be related.
Read what you wrote.
Read the manufacturer's operator's or maintenance manual with particular attention to the troubleshooting section.
Approach the problem from one direction and stick to it until you have excluded the usual suspects.
Now, with that in mind, you say the engine is "losing its prime" does that mean it starts for a moment then stops because there is no fuel in the filters?
What kind of engine is it? Gas? Diesel?
How old is the engine? How many hours?
Is this a recent problem?
Did this suddenly happen or were there isolated occurrences over some period before it became a problem?
Does it just not start at all?
Do you have to bleed the injectors to start the engine after it has sat unused for some length of time?
How long does the engine have to sit before this problem shows up?
How do you restore the "prime?"
Are there any fuel weeps showing anywhere on the engine or fuel lines?
Does this happen if you shut off the tank valves after use?*