Generally, it’s suggested to install flooring first and then paint the walls. Install the flooring, then use drop cloths and painter’s tape to avoid getting paint on the new floors.