Use server-side data fetching in the parent page.js.

Create a component in the Next js and call it in this page.js file.

Send the data that has been fetched from the Rest API endpoint.
Call the value in the component which has been imported to the parent component.

Then use the values as needed in the code.

Result:
