How do I script a sprite to rotate on z-axis at changing amount to always point its front at a coordinate while its being moved?

Sprite I want to rotate is white triangle (player). I want it to rotate on z-axis so its front always points at 0,1,0 when it moves anywhere else. (the angle would change depending on its new position)

I am not looking for a complete answer I am new to unity and scripting I’m just asking for what I should look into and learn about that would be the easiest to use to accomplish my goal.

I always forget the math for this too. This should get you there (might need to set something other than right depending on sprite orientation):

transform.right = target.position - transform.position;

From LookAt 2D Equivalent ? - Questions & Answers - Unity Discussions
Google terms: unity 2d lookat

Good day