Sauté onion and garlic in butter if desired, or add them directly to the pot/slow cooker.
Place chicken in the slow cooker (or pot), add chicken broth, celery, and seasonings; ensure chicken is mostly covered.
Cook until chicken is tender (slow cooker: low 6–7 hours or high 3–4 hours; stovetop: simmer 20–25 minutes).
Remove chicken, shred with two forks, then return to the pot.
Cut cream cheese into small cubes, add gradually while stirring, and keep heat low until fully melted and smooth.
Stir in spinach at the end and let it wilt 2–3 minutes; optionally add heavy cream or shredded cheddar for extra richness, then serve.