Althold mode is good But in loiter mode Crushing

It flies very well in Althold mode. But in loiter mode, the pitch fluctuates back and forth and crashes right away. Attached is the log data. Is there a reason?

I Uesd Cube Blue and Here 3+

Hello @prten welcome to the community.

the reason is that it is not correctly configured. Please configure it using the clear sequence of steps presented in Methodically configure and tune ArduCopter
Use that sequence, do not change it, and do not skip any steps.

You can use GitHub - ArduPilot/MethodicConfigurator: A clear ArduPilot configuration sequence to help you. Post the generated .zip file here so that we can further help you.