There are a couple of issues here:
Firstly, when do you think that line 57 will run?
It seems to be declaring a global, which will run when the app starts. This is not something that is often done in an app. It might be safe, or it might not. Really, you want to run this when your table view controller is constructed.
Secondly, you don’t call classes. You call functions and methods. Classes are instantiated to create objects. If you feel you don’t fully understand that, you need to take a step back and learn it properly now. It will make things much clearer going forward.
So in your class API declaration, you declare a member called dataTask and assign URLSession.dataTask.resume to it. Note that you have not written resume(), so the resume function is not being called - all that it is doing is assigning the function itself - not the result of calling it - to the dataTask member.
Since you’re never resuming (i.e. starting) the data task, its completion handler, and hence line 25, will never run.
As for how to fix this - start with the first issue. Get rid of the globals on lines 17-19 and 57. Start your download from some method In the table view controller - probably viewDidLoad. (Honestly, it’s a while since I’ve done anything quite like this so I’m not totally sure of the best place.) You quite probably don’t need an additional class for this; put it all in your view controller.