Your screenshot doesn't show what occupies the 522 MB block just to the right of OS 3(C:), but from the color code, that is a primary partition, i.e., there is data there.
The built-in Extend command can only extend a volume into empty (unallocated) space "immediately after the volume that you want to extend." https://learn.microsoft.com/en-us/windows-server/storage/disk-management/extend-a-basic-volume
The unallocated space on Disk 0 is before the C: partition.
If there isn't anything that you care about in the primary partition to the right of C:, use "Delete volume" to make that space unallocated and then you can expand C: into it.
If you want to enlarge the C: partition and keep whatever is in the partition to its right, you'll have to use a 3rd party disk management utility. See, e.g., https://www.lifewire.com/free-disk-partition-software-tools-2624950
Although those utilities are generally safe to use, it would be prudent to make a backup of anything important on that disk before you start manipulating storage space.