Well, to add your functions to the graph you would implement it in the graph by right clicking and typing the name of the function.
However, two things:
You’re trying to cast on an animation blueprint? Totally, 100% ok, as long as you’re casting to the owner of the animation blueprint. The reason casts can be weighty is if you’re casting to things that aren’t normally loaded in memory, it HAS to have them loaded. So, for instance, you don’t want to cast to “Money Pickup” on your player, if “Money Pickup” isn’t always in a level- if it IS, it costs nothing. So casting to the player is generally ok. The other thing is you can end up looping your code if you cast to something to get a function that casts back again, which causes a crash.
Try Get Owner-> Cast to "EnemyThing that owns this ABP → Set reference is actually the best thing to do here. Then you’re only casting once, and the reference can be used everywhere in the ABP for free.
That last part is what you already had.
Try get owner → Cast To (whatever the owner is) → set reference. On Intitialize.
And yes, casting has its uses and is often low-impact. In the case where the ABP you’re using will always have the same BP as its owner, it’s nearly nothing, as for the ABP to exist its owner has to exist, so they’re always paired anyway.