The shops and restaurants are all in a walkable area from the boardwalk. Not positive about the museum, but I think it's a little further to the southern end near Chesapeake Beach. Just enough to do there for a day trip that isn't a terribly long day.
The Museum (Bayside History) is at the old fire hall at the corner of 4th and Dayton, across from the Senior Center and Boys and Girls Club. You can see it from the Boardwalk at 5th.
Be aware that the Museum has short hours, Wednesday-Sunday, 9-Noon.
Many of the very few businesses are closed Monday and/or Tuesday. Nice and Fleazy Antiques is now mostly empty, the owner is 85 and liquidated most of the stuff through Bunting Auctions and the building is going through a very convoluted sale process (if you knew the owner you'd know why, although it's still open at random times.
Although the retail business owners don't like to hear it most people come to Town for the beach or the restaurants and not their businesses. They whine a lot about it but most don't want to make the effort to change that. They'd rather be closed on days (Memorial Day, July 4th, Labor Day, Dragon Boat races, holiday Mondays), hundreds of people are in Town than actually have product to sell or workers to sell it.
Just as another example or two: one business a couple years ago advertised a big Christmas sale the week before Christmas, weekdays (when everyone is at work) 10 to Noon. The wine store is closed the three days before Christmas and the three days before New Year's.
The Railway Museum is at the Rod and Reel in Chesapeake Beach, not really walkable from North Beach .