@vardhan0702 Welcome to the community 
This is quite frequently discussed topic in the forum and you can see one such here.
Just you need to learn more about the scope of variables from here. You can use global, environment, collection or local variable based on your need.
Also here you need to access the variable name in the URL instead of body unlike the above example.
Hope this is helpful. Please let us know if you have any other challenges in achieving this chaining of requests 