Second way is Custom Actions - when you would like to send some request to external API and get a response. This is described here: Custom Actions - Adalo Resources.
Answering your second question, the resulting data from a Custom Action is available in subsequent actions (e.g. you can add another action after and use results from the Custom action). However if you would like to use this data later on, you will need to store it somewhere - be it a database or even some input for temporary storage.