Hi Reemali Patil
Yes!, Your guess is correct "The test validation started before the page/content fully loaded" there are few item which might help in that case, Mostly Wait for Actual Content, Not Page Load
for example:
await expect(page.locator('.glossary-term')).toHaveText('Expected Term', { timeout: 10000 });
One cheese way is having the loader and based on the loader to setup await:
await page.waitForSelector('.mx-progress', { state: 'hidden', timeout: 15000 });
For example if I have to execute some script which refers the DOM [for example] to ensure it loads fully is by check the avaiblity first and then calling by script. in this case the loader gets hidden once the dom is generated so after it if the script is called then it should work.
Let me know if this helps