Intel H or HQ processor I have a 9th gen HP core i7 laptop with H processor and 24gb ram geforce GTX 1650 graphics card, and I have a 6th gen i7 with HQ processor with GTX 1350 graphics card with 32 ram ... but by chance the 6th gen Intel outperforms the 9th gen in performance, I don't understand if it has more cores than the other. It will be the difference of the ram memory.
You didn't provide the model of the CPUs... lack of information means it is difficult to share detailed opinions...
The systems have different amount of RAM and different video cards.... depending on the type of task, more RAM / GPU capabilities may have a possitive impact... thermal design of the PC maker is also a factor (it affects CPU capability to turbo boost speed...) ... power settings, whether the PC, driver etc are up to date or not is also important... etc
HQ refers to High performance optimized for mobile, quad core... H is just High performance optimized for mobile
check this for SKU letters and meanings https://www.intel.la/content/www/xl/es/processors/processor-numbers.html