I have tested in my SharePoint Online. The audience targeting works well in the highlighted content web part. If I am in the group of audience targeting, I can see the file in the highlighted content web part.
Please provide some screenshots about the document library, membership of the group of audience targeting and settings of highlighted content web part.
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.