I have read and tried the mentioned methods of allocating free space to my Ubuntu partition and have been unable to succeed. I have tried both gparted and the Disk Utility application provided with Ubuntu 22.04. I believe that I may need to move the Free Space to the right of Partition 6 prior to increasing the size of Partition 6 but and again, cannot do so. I might add that all of my efforts were done from a USB thumb drive using "Try Ubuntu".
gparted image 1
gparted image 2
gparted correct image 2
/dev/nvmen0n1p6
and selestResize/Move
from thePartition
-menu (last screenshot), of course, do it while booted from your USB-thumbdrive withtry Ubuntu
– mook765 Feb 23 '23 at 17:02