How to Smoothly move First Person Character to target location from any starting point with obstacle avoidance

I misunderstood your initial request; what I provided was a way to move to an object in line of sight. What you need is AI query abilities on your character.

For that you need an AI setup–AI controller, Navmesh (which I believe you may not have, thus your error), and Behavior Tree. Find an AI tutorial below:

Smart Enemy AI | (Part 1: Behavior Trees) | Tutorial in Unreal Engine 5 (UE5)

Then, allow your character to be possessed by the AI controller and make it pursue/locate/investigate the point of interest or item you want it to reach. See below:

How to have a character uncontrolled and possess by an AI controller? - Programming & Scripting / AI - Epic Developer Community Forums

Alternatively, you could just create a spline and make your character follow that predetermined path to the goal:

How to Move a Character Along a Spline in Unreal Engine 5