It’s been described in dozens of tutorials in fine detail so I’ll keep it very short. Here’s an example. Both objects are spawned and their references are stored in a variable. In this instance, this is done in the GameMode which is easily accessible from pretty much everywhere:
Now, any blueprint that has access to the GameMode, has also access to those actors. They can also now talk to one another:
I really do suggest you have a look at some online tutorials for these. Spending 3-4 hours now trying to understand how it works will save you days or even weeks later on.