01 - Combine beef cubes with fish sauce, soy sauce, sugar, black pepper, garlic, and shallots in a large bowl. Marinate for at least 30 minutes, or refrigerate up to 2 hours for deeper flavor penetration.
02 - Heat vegetable oil in a large Dutch oven or heavy-bottomed pot over medium-high heat. Sear marinated beef in batches, turning to brown all sides evenly. Remove browned beef and set aside.
03 - Add sliced onions to the same pot and cook until softened, approximately 3 minutes. Stir in tomato paste and cook for 1 minute to develop flavor.
04 - Add lemongrass, star anise, cinnamon stick, and bay leaves to the pot. Return browned beef and toss thoroughly to coat with aromatic spices.
05 - Pour in beef stock or water, scraping bottom of pot to incorporate browned bits. Bring to a boil, then reduce heat to low. Cover and simmer for 1.5 hours.
06 - Add carrot pieces and continue simmering uncovered for 30 to 40 minutes. Cook until beef is fork-tender and sauce has slightly thickened. Skim excess fat from surface as needed.
07 - Adjust seasoning with additional fish sauce or salt. Remove and discard lemongrass, star anise, cinnamon stick, and bay leaves. Ladle stew into bowls and garnish with cilantro, Thai basil, and sliced chili. Serve with lime wedges and crusty bread or rice noodles.