How can I rotate towards a vector3 position in pure ecs?

Normally I do just use transform.LookAt, Vector3.RotateTowards or Quaternion.LookRotation. But I can’t get any of them to works, so there a diffrent way of doing this?

Does the below code not work?? If not please explain what is happening. This is based on your transform to always intend to keep the y axis towards its own up position which may or may not work depending on your situation, but if you can explain more about your issue, maybe it will become clear as to where you want the y axis of the transform to line up to.

Vector3 direction = target.position -  transform.position;
transform.rotation = Quaternion.LookRotation(direction, transform.up);

You can use the quaternion class of the Unity.Mathematics package, like so:

quaternion.LookRotation(dir, new float3(0, 1, 0));