How to copy an object without linking it to the first one? I would like to copy an object without it remaining connected to the first, in the sense that I would like it to be independent (not linked)
I've been looking for a long time but I can't find anything about it, the current method I'm trying is:

example on default delected cube

import bpy

ob = bpy.context.active_object
new_ob = ob.copy()
new_ob.location.x = ob.location.x + 3
bpy.context.scene.collection.objects.link(new_ob)


But this creates problems for me, since it remains linked to the first cube, I would like the second cube to become independent of the first one.
You simply copied the object data block, but it remained linked to the same mesh data block.



After copying the object datablock with new_ob = ob.copy(), add a line to copy the datablock.

new_ob.data = ob.data.copy()