Is It Possible to Go to Moscow from St Petersburg for a Day?
Yes, provided that you are traveling by a high-speed train and you have a visa (you are not on an E-visa which restricts to you to St Petersburg region).
Option 1: You can catch a morning Sapsan train from Moskovsky Vokzal train station (metro Ploschad Vosstania) in St Petersburg.
The earliest train leaves St Petersburg at 5-30 am and arrives in Moscow at 9 am. With a travel time of only 3.5 hours, this appears to be the fastest morning train. There are other Sapsan trains scheduled later in the morning, they take slightly longer, about 4 hours.
The return Sapsan train leaves Leningradsky train station at 9 pm and arrives in St Petersburg after midnight.
Option 2: You can also catch an overnight train one way or return – Red Arrow or Gran Express – that takes about 8-9 hours. These trains leave after 11 pm and conveniently arrive at destination around 7 am or 8 am.
Option 3: An Aeroflot flight from Pulkovo airport to Sheremetyevo airport or Vnukovo Airport in Moscow. A flight takes only 1 hour but of course, there are rides to and from the airport and waiting time.
Option 4. I found this private day tour from Saint Petersburg to Moscow which includes round-trip transportation.

My alma mater, Moscow State University
In Moscow
Trains arrive at Leningradsky Vokzal train station in Moscow at Metro Komsomolskaya on the ring line.
You can take the metro or taxi to the city center (app taxi like Uber, Yandex, or Gett).
Moscow is a huge city, but 10-11 hours in the city center will give you enough time to explore the Red Square, see St Basil’s Cathedral, walk the GUM and the adjacent area, and visit the Pushkin Museum or the Tretyakov Gallery.

Guided Tours in Moscow
You can arrange your tours and guides through Tripadvisor/Viator or GetYourGuide.
I recommend picking private tours in the interest of time. The private tour guides can pick you up from the train station.