thank you for the question. As I understand your question, you ask how to make the content SEO friendly with a headless CMS, right?
If you render the content on the backend (e.g. in your PHP/.NET/JAVA/RUBY/node.js code), your webserver returns standard HTML code, so there’s no problem.
Let me know if I answered your question.