You could use Windows Disk Management tool.
Open Disk Management through the Run window by pressing the Windows key + R at the same time, then enter ‘diskmgmt.msc’ and click ‘OK’. Once Disk Management has loaded, right click on the C drive, and select the Extend Volume option to extend the C drive with the unallocated space.
If the unallocated space is not adjacent to the C drive, or the unallocated space is not on the right hand side, you will delete the partition(s) between the to-be-extended partition and the unallocated space. In Windows 10 Disk Management, right-click the partition that you need to delete and choose “Delete Volume”. Then, right-click the to-be-extended partition and you’ll find “Extend Volume” is enabled. What you should know is that all data on the deleted partition will be lost.
Hope above information can help you.
If the Answer is helpful, please click "Accept Answer" and upvote it.
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.