Hi @Ching Song Lim,
Thank you for posting in this community.
I regret to inform you that SharePoint Online does not have an out-of-the-box method to display different files in the file library according to the login account.
I have an alternative way to allow people in different departments to view files or folders in their own department. You can see if you can use it as an alternative.
- Create two folders in the file library to hold files or folders for each of the two departments.
- Create a group for people in the same department.
- Please go to Site Content->Site Settings->Users and Permissions ->people and groups.
- Groups->more->New Group.
- Add permissions to folders so that only people in the corresponding department can access or edit the contents of the folder.
- Select Folder->Manage access->Advanced Settings.
- Click Stop Inheriting Permissions
- Grant Permissions. Select the group which you created for Finance department and give a permission level for this group. That is what permissions this group has on Finance folder.
- Do the same for another department.
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.