How to get other query post url?

Hello I want my related articles query (through acf relatioship) header link not to articles but to magazine they are related or just post_url from magazine query.

How to do that?

create a query magazine-query within your articles-query. then all dynamic data tags within that magazine-query will result in magazine-related output.