Optimize long tasks
This post is 2 years old — some details may be outdated.
Each phase affects INP differently, but fixing input delays and slow callbacks both come down to minimizing long tasks
https://web.dev/articles/optimize-long-tasks
The doc on optimizing long tasks will take you through the yielding strategies to break them up effectively