It would be better if you could post the output of this command by using the Terminal app:
diskutil list internal
I'm assuming you are wanting to work on the internal drive, but if my assumption is wrong, then replace "internal" with "external" in the previous command.
It would also help to know what was using this space that you no longer need. If you were using Windows Boot Camp, then you need to use Boot Camp Assistant to recover the partition/container into the main macOS partition/container. If you did not do this, then you need to start over by erasing the whole drive and restoring from a backup or clone.
Sometimes it is just impossible to merge partitions and you need to start over by erasing the whole physical drive and restoring from a backup or clone.