If you want to make changes to a file in a SharePoint document library, but keep others from making changes at the same time, check the file out of the document library.

When you check out a file from a SharePoint document library, only you can edit it. You can edit the file either online in Microsoft 365 or offline and save your changes as often as you like before checking the file back in. Once you're done making changes to the file, check it in from the library to upload your changes. You can discard your changes and undo the check-out if you change your mind.

Open in a web browser your SharePoint Sites.

Go to a Document Library 

for example
Click on the Drop Down 'All Documents'
Click on 'Edit current view'
1: Find 'Checked Out To' and check the box
2: Click on OK
You will now see a column, like below

For example
(5 minutes)

Discarding a check out

Once you view has been modified, you can check files back in, or discard their checked out Status

On a file (or Folder) that is checked out, right click
1: Left Click on 'More'
2: Left Click on 'Discard check out'
A window will appears, as below, read the message and if you are happy left click on 'Discard check out'

Repeat as necessary.