Strapi V4 - how to bootstrap some data

I’ve been able to give some steps reading the source code. Now my code looks li ke this:

  async bootstrap({ strapi }) {
    // create user admin if it doesn't exist
    await strapi.admin.services.role.createRolesIfNoneExist();
    const superAdminRole = await strapi.db.query('admin::role').findOne({where: {code: 'strapi-super-admin'}
    const superAdmin = await strapi.db.query('admin::user').findOne({where: {username: 'admin'}});
    if (!superAdmin) {
      const params = { 
        username: 'admin',
        email: 'admin@email.com',
        blocked: false,
        confirmed: true
      }   
      params.password = await strapi.admin.services.auth.hashPassword("Admin1234");
      params.roles = [superAdminRole._id]
      await strapi.db.query("admin::user").create({
        data: {...params},
        populate: ['roles']
      }); 
    }   
  },  
};

However, this is not working properly, and even the logs complain:

Admin UI built successfully
[2022-07-19 11:33:13.148] warn: Your application doesn't have a super admin user.
[2022-07-19 11:33:13.205] warn: Some users (1) don't have any role.

Any hint on how to properly relate the user with its role so after this bootstrap we can say there is a super-admin user?

Thanks for your time! :pray: