I would definitely check your battery switches and all contacts for that matter, for corrosion or not being tight enough. I swapped out both batteries on my boat in September/October of 2023, two years after buying my boat. I usually leave the boat out on a mooring buoy in front of our beach cabin all summer, and when bringing her in for the season, she wouldn't start. Replaced both batteries, brought the boat in and didn't have any other issues that season. Then the next spring, tilted up the motor, updated the GPS with updates and took her down to the boat ramp. Pulled her off the buoy and she wouldn't start, would just give a "click" noise and then nothing. Got the boat back on the trailer after tying up part of the dock for a bit, took her back to the cabin and went over all of my connections again. Put a wrench on one of the battery terminal nuts, gave it the slightest bit of tightening and that was all she needed. Not sure if the terminals just weren't making good enough of a connection with the connectors or what happened, but loose connections and corrosion can very much give you starting/charging issues. Just out of curiosity, the battery that you replaced that was only two years old, was it an AGM or wet cell battery? A two year old battery, unless it was a dud from the factory, had been drained down multiple times or some other issue... doesn't seem like it should have an issue with it, especially only being two years old.