Because the string trimmer can create straight lines pretty easily in this position, a weed whacker will give you the crisp edge you want between your garden and your lawn.
Hold the weed whacker in an upright position. Use the handle to twist its head upside down so the string's line spins parallel to the straight edge you want to create.
Hold the trimmer at a height where the string is barely touching the soil. Then, slowly walk along the edge, holding the trimmer so that the string is vertically aligned.
Remember to turn the machine's head so the deflector shield is between the spinning string and your body. Additionally, wear safety goggles for protection.