Hi @PREM
In my opinion, you do not need to assign license for deleted/terminated accounts.
Please refer to following articles:
OneDrive retention and deletion
Set the OneDrive retention for deleted users
If a user's Microsoft 365 account is deleted, their OneDrive files are preserved for a period of time. You can set this time period. You may enter a value from 30 through 3650 in the Days to retain files a deleted user's OneDrive box.
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.