Feeding a parrot a cookie does not count as killing.
Note: This is probably the reason why you cannot kill an Invulnerable parrot this way in Creative mode (see
- Create a scoreboard objective tracking how often you killed a parrot
- Have the objective be displayed on the sidebar
- Spawn a parrot and kill it by punching it to make sure the objective works
- Spawn another parrot and feed it a cookie