The object that I'm printing detaches from the heated bed

Check the temperature of the heated bed (PLA = 50°C). Make sure the surface of the bed is grease free (clean it with rubbing alcohol, degreaser, …) Make sure that while printing the first layer the tip of the nozzle is at the right distance from the bed so it squishes the first layer on the bed, thus creating a good bond between the plastic and the heated bed. Check if your bed is level. You can also use a fine grit sand paper (400) to roughen up the surface of the heated bed.