You need to tell WP where to get the information from.
To be honest, I can’t tell by your code above exactly what you mean. But there is an explanation on getting fields from the related post on the post object field doc https://www.advancedcustomfields.com/resources/post-object/
You can either do this or you can supply the post ID to the WP functions.