How to improve FCP and LCP score

Hello, dear friends!
I am currently implementing synthetic monitoring to obtain metrics of the status of certain services.

For this I have followed the documentation to set up a full elastic agent with docker to use it as a private location for the monitors.

The monitoring is functional, fluid, stable, but I found some details that caught my attention:

FCP and LCP values are excessively high in the first step of each script executed by the monitors.

Attached is an example of one of the scripts running one of the monitors. In this case, in the first step is where I see the increase in these scores.

step('Ingresar a URL', async () => {
  await Promise.all([
    page.goto("https://url-test.com"),
    page.waitForLoadState('domcontentloaded'),
    page.getByRole('button', { name: 'Aceptar cookies' }).click()
  ]);
});
step('Validar', async () => {
  await page.locator('#frmLogin_main_DniInputMasked_tbxInput'),
  await page.locator('#frmLogin_main_UserInputMasked_tbxMasked'),
  await page.waitForSelector('text=Documento'),
  await page.waitForSelector('text=Clave')
});

As additional information, I have tested the internet link from the server where the agent container runs, and from inside the container. In both cases the DNS Lookup, TCP Handshake, TTFB and Total Time values are identical and very low, so the link seems to be working correctly.

I was researching possible causes and wanted to validate with you if this is a product of synthetics performance.

If so, is there a way to improve the FCP and LCP score?

Thank you very much!!!