replace the flooring first.
I hope you finish the wood floors with some kind of varathane/staining or something... because unfinished raw wood, will absorb stains etc.
Is this tongue & groove wood flooring, or square sheets that are already finished?
Real wood or synthetic like Pergo?
After the flooring is installed and completed, then do the baseboards.
And/or trim/moulding.
Sand it first... and fill any holes with wood putty. Then sand again to smooth it.
Can apply primer first. Then after it is dry, paint it.
You need to decide what finish of paint you want for the trims. ie: eggshell, satin, semi-gloss or gloss. Usually, trims are painted in a semi-gloss... if a higher gloss then brushstrokes shows up more as you paint. Semi-gloss paint is also easier to wipe clean.
"Matte" paint attracts dirt/stains and is harder to clean.
"Egg-shell" paint finish... has a very very slight sheen.... but not 'matte.' and it is not 'glossy.'
White trim is very nice and versatile.
Use a water based interior trim paint. Easier clean up that way.
And of course, put down drop-cloths on the floor before you paint to protect the floors from dripping paint. :)
As a side note: laying down flooring can be tricky... you have to measure out the space... and then know how to cut the wood/flooring when around corners or odd shaped perimeters. Unless your room is a perfect square... and you need the proper tools to be able to cut/saw the flooring... and you either work from the center of the room outward... or from one side of the room toward the other... or from the perimeters inward... it depends on what kind of flooring you are installing. ASK the people at Home Depot or your home improvement center.
good luck,
Susan