Place the boneless, skinless chicken, yellow onion, celery, carrots, salt, black peppercorns, and bay leaves into a large pot. Pour in cold water to fully cover the chicken.
Bring the pot to a rolling boil over high heat.
Once boiling, reduce heat to low, cover, and simmer gently: 15–20 minutes for breasts or 20–25 minutes for thighs.
Check that the chicken reaches an internal temperature of 165°F (74°C) and is opaque with no pink remaining.
Remove the chicken from the pot and let it rest on a cutting board for 5–10 minutes.
Shred the chicken using two forks until bite-sized pieces form.
Strain the cooking liquid through a fine-mesh sieve into a separate container and discard the solids to reserve homemade broth.