When ever I open any software regarding camera app. And open to scan or take a photo phone instantly crashing down.
Clear the storage and cache for Camera and see if it works.
@naitikdave7 As ronald1985 suggests, try clearing storage and cache by long-pressing the camera app icon -> App info -> Storage & cache
If you're able to backup your data you can also try performing a full factory reset.