How to avoid operator `collection_instance_add`?
Just do all necessary steps

Create a new Empty object
Set instance_collection to the collection you want
Set instance_type to 'COLLECTION'
Link the resulting object to the place you want to have it in
(reference: Basic Object Operations Example)

source_collection = bpy.data.collections[&quot;the_name_of_the_collection_to_use&quot;]
instance_obj = bpy.data.objects.new(
    name=&quot;my_new__obj_instance_name&quot;, 
    object_data=None
)
instance_obj.instance_collection = source_collection
instance_obj.instance_type = 'COLLECTION'
parent_collection = bpy.context.view_layer.active_layer_collection
parent_collection.collection.objects.link(instance_obj)