Toss the thinly sliced beef with cornstarch in a bowl until evenly coated.
Heat vegetable oil in a large skillet or wok over medium-high heat. Add the beef in batches and stir-fry until browned and slightly crispy. Remove beef from the skillet and set aside.
Add the chopped onion to the skillet and stir-fry for 2-3 minutes until softened. Add minced garlic and grated ginger, and cook for another minute until fragrant.
In a small bowl, whisk together chili sauce, soy sauce, rice vinegar, brown sugar, and beef broth. Pour the sauce mixture into the skillet.
Bring the sauce to a simmer and cook for 2-3 minutes until it thickens slightly. If using, stir in the chopped red chili pepper.
Return the cooked beef to the skillet and toss to coat with the sauce. Cook for another minute until heated through.
Serve immediately, typically with rice or noodles.
Notes
This chilli beef is best served hot and fresh. You can adjust the amount of chili sauce to control the spiciness.