Relativity has always been a "data first" mindset when building a site with a piece of data being related to other pieces of data. But if there is no front end in the Drupal site, how do we offer this data and its related data up for consumption?
- We allow Drupal itself to decide what goes out in the data structure that others consume relying on the consumer to create complex queries to construct their intended data flow.
- We customize these endpoints with data and its related data, but offer "pre-related" data snapshots.
If you lean towards the first option where Drupal outputs data to automated endpoints, you're in luck! The JSON:API module does that with zero configuration. Basically, just install the module and you're done! There is a helper module available named JSON:API Extras which allows for some added configuration.
If option 2 above looks attractive, Drupal Views as a REST endpoint might fit.
One additional possibility for option 2 (and my favorite by far) is GraphQL.
I'll write more on these options with pros and cons as time allows, but the main point here is that Drupal offers many possibilities if you're looking to go headless or progressively decoupled.