How to add dynamic content to the cart page efficiently?

Hello everyone,
What is the best way to add dynamic content (retrieved via an external API) to the cart page? I was able to do this for one of my clients by editing cart.liquid and writing my code there - this works fine but I’d like to streamline the process for the rest of my clients.

Can I build an app that adds my js code to the cart? does it need to be an embedded app? what about script tags?

The code I’m trying to embed doesn’t do anything fancy, it just gets data from the cart, sends it to the external api and get data back

Thanks

App extensions may suit your use case:

https://shopify.dev/apps/online-store/theme-app-extensions