This question comes up a lot. All the moorings in Gosport Harbor are private. Many belong to several different yacht clubs. Some clubs advertise them as available, but if a member shows up, you have to move. And some members haven't gotten the word, and will kick you off even if they don't need to. (Fortunately, that one lady who used to scream obscenities from a nearby mooring seems to have mellowed.)
The rest of the moorings belong to individuals. Again, some won't mind if you borrow theirs mid-week, but you have no idea how well maintained the gear is, or if it's even sized for your boat. I've watched boats drag up on the rocks during squalls there. Some moorings belong to fishermen, who are generally well armed, often cranky, and sometimes drunk. Others to locals or to the hotel operations. Best to avoid those.
Basically, don't plan on spending the night there on good-weather weekends. Be prepared to move even if there are plenty of moorings available. It seems everyone knows there are "free moorings" there and the place can fill up quickly.
Anchoring in the harbor is poor at best. There's hundreds of years' worth of debris on the bottom. Any wind out of the northwest really churns things in there.
Around the other side of the breakwater there's a good anchorage in settled weather, or northerly to westerly winds. But there's no good place to go ashore.
Not sure if the hotel will open this year. Last year Covid killed the whole season. If so, by all means check it out. There's a dinghy dock. Sign in at the pier. Enjoy the rocking chairs on the porch, or walk the island. Check out the book store, gift shop and snack bar. Make a reservation for dinner. Lots to see and do!
That anchorage marked on the charts off Kittery Point, just upriver from Pepperell Cove, is deep and there's a swift tidal (reversing) current. Some people make it work, but the holding is hit-or-miss. Above Fox Point in Newington works, and there are a few more of those private "destination" moorings that are usually available mid-week. There's still a good current up there, and you need to watch the charts for ledges (like the one right off Fox Point, and another across the river from the mooring field) but most of the bottom in the Great Bay area is good mud for anchoring, anyway.