Bezier points not at expected location I have following little script, fetch the points from the bezier and add a Null object at each point.
from bpy import context, data, ops


bez_curve = context.active_object
bez_points = bez_curve.data.splines[0].bezier_points

for p in bez_points:
    new_obj = data.objects.new('spline_point', None) 
    new_obj.location = p.co
    context.scene.collection.objects.link(new_obj)

But the Nulls I create at each point is placed in what looks like random locations. Total of 4 points added to the Bezier. I have obviously missed something here!
Curve coordinates p.co are local coordinates.
Use the curve world matrix to transform them to world coordinates:
from bpy import context, data, ops

bez_curve = context.active_object
bez_points = bez_curve.data.splines[0].bezier_points
world_matrix = bez_curve.matrix_world # Get the matrix

for p in bez_points:
    new_obj = data.objects.new('spline_point', None) 
    new_obj.location = world_matrix @ p.co # Use it to transform coordinates in world coordinates
    context.scene.collection.objects.link(new_obj)