In the SharePoint UI and Word Online, there is no OOTB way to directly save doc file as PDF file in the SharePoint document library.
As a workaround, you could open the doc file in the Microsoft 365 Word client application, then click File -> Save as -> Choose the SharePoint site you want to store the file -> Choose the file type as PDF.
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.