Not if you are only converting one file at a time. This process is sequential, as H264 is a GOP codec. It does not lend itself easily to encoding in multiple parts in multiple processors.
And, besides, that is not the only reason.
I could be wrong, by my guess is that the reason CPU and GPU are only partially used is that the IO is the limiting factor.
Now if you create a batch consisting of multiple input files and/or multiple outputs for each file, Compressor will gladly use more cores.
You can also go to Compressor->Settings->Advanced and check how much additional instances you can use.
This is dependent on your mac hardware, and I think that with an M1 Pro you should be allowed to have 1 additional instance - that is kind of having two copies of Compressor running side by side. Again, you will have to be doing more than one job simultaneously to see the benefit from it.
It would be enlightening to see a comparison of results you get from Compressor vs Resolve. Note that just saying H264 does not tell the whole story. The file size and the output bit rate can have a tremendous impact on the amount of work needed for encoding.