Too many people do not give enough attention to all of the details to get the right first layer.
Once that you do, so many of your problems will disappear and your printing will become fun and much more predictable!
There are 6 Main Factors in getting the perfect first layer
1. Well Trammed Machine
(this is not so much about the first layer as in good preparation for the rest of your steps)
Tramming your machine is making sure all of the components are at perfect 90° to each other, this doesn't mean leveling with a bubble level gauge. It means making sure your vertical elements are all at 90° to the horizontal elements, that your X gantry is Parallel to the bed and at 90° to your Z axis.
Many people think that if you have an inclined X and you level the bed to this, you have resolved your problems, but you will be printing all of your vertices on an angle and get bad geometry models.
Take the time to set your machine correctly, loosen screws, hold an accurate machinists square to the joints, and retighten. It will make difference in the long run!
2. Clean Print Surface
You really need to get in the habit of wiping your print surface frequently, maybe even every time between a print as the finger grease, dust from the ambient, and residual from the tools and filament used can all contaminate the surface and act as a barrier between adhesion or not. I recommend keeping a roll of paper towel and a squeeze bottle of isopropyl alcohol next to your machine and make a clean wipe always part of your set up procedure.
3. Flat Print Surface
as we are going to see in the following steps variations of as small as the thickness of your hair or even 0.1 mm can cause the first layer to be off. If your print bed is warped you may be able to get a good level over certain points but there will be others where the bed will be too far or too close to the nozzle. The best way to check for flatness is to take an accurate steel ruler, put it on edge across the bed and get your eye down to the height of the surface, shine a light from the other side. If you see light shining through you have a bowed surface. Repeat this in every direction, on diagonals and on X and Y.
If your bed is not flat, you can shim it under the print surface with thin aluminum strips, very carefully. or find a bed material which is perfectly flat like Borosilicate Glass, or MIC6 Tool grade aluminum sheet.
4. Well Leveled Print Surface
Level your bed with a good leveling program that stops right above each adjustment knob.
Always level with nozzle and bed heated to desired print temperature.
Take your time in adjusting the heights, never move one knob too much at a time as this can bend your bed!
I like to use heavy stock paper to level, as I can feel the right resistance between nozzle and bed such that it pulls paper but allows me to push and pull it through without it bunching up.
Keep allowing the program to cycle, as you adjust one knob it may send another corner slightly off.
Go around the whole machine multiple times till you can make a full rotation around all knobs without having to touch a knob.
Once that you have leveled well, do a live level. This can be built into the model you are going to print by having the slicer create a one layer skirt 2-4 rings, as far away from the model but well on your build surface. As the machine is printing the skirt layers, observe and very slightly adjust any knobs in areas which are too high or too low. You will be able to get just the right settings with this method.
5. Setting the Gap
once you have a flat and clean print surface and have leveled the machine, the gap is everything!
See the illustration. If the gap between nozzle and print surface is too far you are printing in air, your filament has a chance to slightly cool before falling onto the bed, it may grip or may not grip. the cross section of the filament will be ROUND. There is a good chance the filament will not stay where you are printing it but rather follow the nozzle around corners, and eventually bunch up. This is not optimal. You need to squish your first layer against the build surface for it to stick well and stay down. You will need to lower your gap.
If your filament is being squished till its paper thin, to where it sometimes doesn't come out, or looks dragged, you are probably too close, so make your gap larger ( a little at a time). If your printed filament is being squished to your print surface so that it is slightly wider than if printed on air, and has a flat top, but a consistent width you have probably found the perfect gap! When your gap is perfect your solid fill areas will become completely filled, your prints will stick down and you will love 3D printing!
There is no single measurement for the exact gap, this depends on your filament you are using (for example PLA can be squished much, PETG doesnt like to have nozzle dragging over it), it depends on your print surface material, it depends on your nozzle size, your feed rate, etc….. So get used to looking at a live level and feeling the bead with your finger and adjusting on the fly. It gets very easy over time.
However generally the first layer should be about 50% of your nozzle size, so if you are printing with a 0.40 nozzle you may want to begin with a gap of about 0.20
6. The Right Print Surface
There are many options for good print surfaces. You can use glues, hair spray or tape to help your filament stick, but I think of these as training wheels, there is no need once you follow the right steps, and getting rid of these may speed up your clean up and preparation time will keep the bottom of your models uncontaminated, and save you money on consumables over time.
You can print on build surfaces commonly sold and typically made from PC. These provide great stick, but be careful, they cannot take filaments which reach high heats, even PETG tends to fuse to them a bit too well. You can try PP sheets as well. You can print directly on very clean glass, but you will need your gap and level perfect. You can print on Kapton tape or a PEI sheet, this is one of your best options as it resists heat much better than PC and as such you can print PETG and ABS and other materials on it. PEI also can clean up well with alcohol, is resistant to even acetone, and you can re-vitalize with a bit of steel wool and alcohol.
7. Bed Temperature and Print Speeds
Make sure you have heated your bed to recommended temperatures for best adhesion, turn off your bed fans for first few layers so they get a chance to fuse down well, and LOWER your print speeds. Go as slow as you can for your first layer, If I am printing at an average 60mms/second for my main model I print first layer at 40% or 25mms/second. This will give it a chance to really lay down well without being dragged by the print head. This will help thin areas and supports to grip well.