Yes of course, the way to write your javascript can vary if you want the next action to wait this one to be finished (and use the result of your fetch in the next workflow steps).
basically you have to put the keyword await
before your fetch, and return the result if you want it to be accessible in the next steps