How to add loading screen while waiting for API response

Hello everyone, I want to add some indicator that my plugin is waiting on an API response but I’m not really sure how to go about it as I’ve never done any sort of loading(? screen.

Do you have any ideas/examples? I haven’t used any plugin that shows it loading so I don’t know what to do.

My requests take from 10 to 20 seconds to arrive.