If this issue started after your software update, you need to wipe your cache partition, as Khaled75 said. If that didn't work on your end, you need to bring your device to an Authorized Samsung Service Center. You can find the nearest Service Center in your area here: https://www.samsung.com/ph/support/service-center/?msclkid=72d47e20cf8411ec8ac1394658c823b0
As for the Messenger app, you can reinstall it again on your phone. If you're still logged out on Messenger by then, then there's a problem with the app itself. You need to send feedback to the Messenger app's developers and include all the troubleshooting steps you did so they can help you better.