Your Windows and Ubuntu partitions aren’t actually adjacent: there’s 390 GB of unallocated data between them.
You’re asking about shrinking your Windows partition - you don’t need to do that if you’re happy to use the unallocated space - it’s clearly much safer not to mess with your Windows partition unless you have to. If you really want to shrink Windows let me know in a comment and I’ll post back.
Back everything up first: your Ubuntu partition is at highest risk as that’s the one you’ll be moving / resizing, but there’s always risk to anything on the drive when manipulating partitions (mostly due to human error, but bad things do happen) - so make sure you have good backups.
You’ll need to use a live usb session with gparted: you can’t resize / move a mounted partition. Pop your usb with Ubuntu in, start the computer and enter bios (often holding down f2 / f10/ f12 / Del or Esc whilst it’s powering on - check your hardware’s documentation or search online), get it to boot from usb, select Try Ubuntu.
Open gparted. You should then be able to move the partition and resize it - it’s pretty self explanatory. Ensure you’ve got the correct drive selected if more than one, highlight your Ubuntu partition, select Resize/Move from the Partition menu, and make the changes.
You can expect it to take a long time as the entirety of the data in your Ubuntu partition has to be moved to the left.
Please do ensure you have backups before you resize / move partitions.