Hi @Bharathhm
Welcome to the Power Pages forum. I am not sure whether you have explored Portals web API. Official docs here
you can build most of the functionalities without writing your own data using API.
Power Pages is tightly coupled with Dataverse. You can achieve many things using the OOB functionality.
Enough of my lecture,
You have few options here to fix the issue
1. You can do simple Ajax calls
2. You can try fetch call. Check this blog
3. Use Power Automate and HTTP trigger and return the value to Power Pages. Official URL
Assuming you are doing Ajax call, then the next step is to "enable implicit grant flow" to avoid the CORS issue
Official URL here:
@OliverRodrigues & @OOlashyn - anything I am missing here?
Hope it helps.
------------
If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.