As an M-owner, and apparently crappy sailer, I'll agree with
@DrJudyB,
@Mr Fox, and
@JRT. You have an enviable budget for a first time buyer. Decide how you plan to use the boat and what sort of weather you want to prepare for. In bays, rivers, and thin water, a swing keel or daggerboard boat will be better. If you plan to trailer, or that idea even appeals to you, the swing keels and daggerboards are what you need to be looking at. If you want to spend lots of time offshore in bad weather, you need a serious boat. If, on the other hand, you only want to slip out into the ocean on good days, a trailerable would be fine.
If you will keep it in a marina, only hauling it once a year, and never plan to sail in other places, that opens you up to a heavier boat with more permanent ballast.
Trailering is great if you want to keep your boat at home and sail different places. Cheaper than marina storage. Downside is time required to setup and tear down for launching and trailering. I'm at 20-25 minutes for setup, and around 45 minutes teardown and secure for trailering home. Add another 30 minutes for washdown if you are in brackish or salt water.
Keeping it in a slip is the ultimate in convenience, but costs more and requires bottom painting. And likely more maintenance otherwise due to exposure. Basically, you can stop by the marina anytime you have a couple of hours and go for a quick sail, though - so it's a pretty sweet gig when everything is right. If a bad storm comes in, you might have to go check on your lines / add lines to make sure your boat is secure (maybe check your neighbor's lines, too).
Absolutely agree that a reliable motor, and good knowledge of it is essential.
I'm not going to get into defending my boat's brand, but I've been out in 25knotts gusting over 30, small craft advisory, and significant swell in my 26m. In fact, I took my middle daughter for her first sail in those very conditions. My boat can plane in more chop than I can stand and it has somehow managed to stay intact. I've motored unballasted with 4 adults, and ballasted with 6. It runs about 17 knots empty and about 15 knots full, so you can still cover good ground. Although, if it's blowing 25-30, you won't want to be motoring much over hull speed. The rig is light, as is the boat construction. That's why it can be launched and retrieved like a bass boat. While they sometimes are taken for blue water cruises, I wouldn't select one for that purpose. I wouldn't select an X or M if I wanted to race much either. PHRF is in the 250+ range if I recall correctly, compared to the earlier models which run 213-222 range.
There are a huge number of boats in the 22-28 ft range for the money you have. You need to look at a bunch of them, go aboard and try them on. See if you can get a day sail out of folks if you bring the food and beer. Hone in on how you want to use it. Catalina, Hunter, Macgregor, Potter, and many others offer boats that will do what you have described above; bays, no overnight off-shore, and sandbars.
Don't ignore a multi Hull if you happen on one that's a good deal, either,
I think it's been said before, but I'll plus one; buy the best boat and accessories you can - unless you're looking for more of a project. That way you'll get to sail some before the projects start. After all, it is a boat.
Happy hunting!