Hi:
There are no settings to change in order for the memory to work, so you must have installed memory the PC doesn't like.
Below is the link to the Crucial memory report for your specific model notebook.
https://www.crucial.com/compatible-upgrade-for/hP---Compaq/pavilion-gaming-15-dk0003nq
They have compatible memory for sale.
I would definitely buy DDR4-2666 MHz memory since that is what HP installed in your notebook.
Your notebook's i5-9300H processor was engineered to run the memory at 2666 MHz and the 2400 MHz memory is not compatible.
See the memory specs from Intel...DDR4-2400 memory is not supported.
https://ark.intel.com/content/www/us/en/ark/products/191075/intel-core-i5-9300h-processor-8m-cache-u...