Hello ghislain38,
From your post it appears that Messages is shutting down on your MacBook Pro.
The first thing we recommend is to check to see if there is a macOS update available. macOS 11.5.1 was recently released.
If needed, here is how to update: Update macOS on Mac - Apple Support
Once updated, if the issue continues, try starting up the system in what is called safe mode. This will help isolate this issue.
To start in safe mode, begin with the computer powered off. Follow the directions found here, depending on what type of Mac you have: How to use safe mode on your Mac - Apple Support
The computer will take longer to start in safe mode, and the screen may have some distorted video as it starts up. This is normal. Once you are logged in, use the system and test to see if the issue continues.
If everything seems to work as expected, go ahead and restart the computer normally and test again. Starting in safe mode forces the computer to run some disk checks similar to First Aid. This can resolve some issues.
Cheers.