@KannanCh2 :
With content fragments,
If your use-case is to to build only headless content in AEM, it would be easier to create CF model(s) instead of building complex components and exposing the content of them via an exporter. This use-case can be easily solved using CF with GraphQL APIs.
Please refer this adobe documentation for more information: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/assets/content-f...
If you have to create pages in AEM as well as expose some of content from pages to a headless application, in that case you can create components (with rendering scripts htl) and using sling model expose data as JSON.
thanks.