Per my knowledge, 5 days of inactivity as long as the users chooses Keep me signed in. If the user accesses SharePoint again after 24 or more hours have passed from the previous sign-in, the timeout value is reset to 5 days.
Currently, you can't change the default timeout of session.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.