Insert iterated values from one table to another in OracleDB
You can check whether the entry for the user already exists in the table and then exclude that users.

Depending on your data, you can do it with an insert, e.g.

insert into task_group (id, user_id, phone,name, company_no)
select rownum, id, phone,name, 22 
  from users u 
 where not exists(select 1 from task_group t where t.user_id = u.id);


you cann also loop over the data in your cursor and do commit every x Rows, but it is a very slow way to do that