オブジェクトの選択

動作確認した環境 [3.1]

import bpy

bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
obj = bpy.data.objects['Cube']
obj.select_set(True)