When happy ghasts are attached to a lead or touching the ground they create a ton of lag. Everything gets a delay. Apparently this is causes pathfinding issues, which causes the lag.
Steps to reproduce
Attach a happy Ghast to a lead and make it so it can’t go where it wants to, or make it’s tentacles touch the ground
Wait a bit
Test some thing like placing blocks, opening chest, etc. and see how much lag there is.
This issue is being tracked at MCPE-222147.