Put the beef in the freezer and bring 4 ½ cups stock or water to a boil in a large pot.
Peel and chop 2 inches of ginger. Trim and seed the chile; slice it crosswise into thin rounds. Also trim 2 lemongrass stalks if you’re using them; crush them on a cutting board with the flat side of a knife, and cut each into 3-inch pieces. Chop 1 cup basil leaves. Save the stems.
Add the ginger, chiles, lemongrass, and basil stems to the pot. When the liquid comes to a boil, adjust the heat so that it bubbles steadily but gently. Add the coconut milk; return the mixture to a steady bubble.
Trim and peel the carrots; slice them crosswise into thin rounds. Then halve the lime.
Remove the beef from the freezer and slice it against the grain as thinly as you can.
Remove the lemongrass and basil stems from the pot with a slotted spoon; discard.
Add the carrots to the pot. Cook undisturbed until they begin to get tender, 2 to 3 minutes.
Add the beef to the pot and cook, stirring once and adjusting the heat so the liquid bubbles steadily, until just cooked through and the carrots are crisp-tender, 2 to 3 minutes.
Add 3 tablespoons fish sauce, 1 teaspoon sugar, and a sprinkle of salt and pepper. Squeeze the lime juice into the soup.
Stir in the basil leaves. Taste and adjust the seasoning. Serve.