The fetch is an asynchronous function and returns a promise, therefore you need to return the resulting promise in getData to access the result in printData. If you store the result in a global variable, the fetch request is not completed before you want to access it.
http://www.sobell.net/aurelia-async-bindings/ suggests using a custom binding behavior that will put a “loading” message when a promise is returned and later replace the message with what the promise resolves.
With all due respect I would highly recommend to read up about how promises work as that is a fundamental concept of JS unrelated to Aurelia. Here is a nice read https://javascript.info/promise-basics just as an example your printData doesnt return the promise so even if you’d use an async binding it wouldn’t work. Again this is not meant as an insult in any way but its paramount to properly grasp a few basic constructs. I can assure you that doing so will help with every Framework you might use in the future