How do I subdivie Ctrl+n an object in Python?
subdivion_set, it seems, is the Subdivison Surface modifier (by default actually is Ctrl+2 for me). 

Those bpy.ops. methods apply to the currently active object. It's good that you created one by bpy.ops.mesh.primitive_uv_sphere_add(size), because it creates all all necessary things AND selects the created object. There is good page about different methods for creating meshes in the documentation at 3 ways of creating objects.

TLDR, right after you created object with bpy.ops.mesh.primitive_uv_sphere_add(size), call bpy.ops.object.subdivision_set(level) without any variable setting for sphere.