You should use lifecycles and extensions for this.
Create an extension under ./extensions/users-permissions/models/User.js
Now take a look at the below code:
'use strict';
module.exports = {
lifecycles: {
async afterCreate(data, model) {
//id of the newly created user.
let userId = data.id;
//creating the profile with relation to that user.
await strapi.services.profile.create({
...DataForProfile,
users_permissions_user: userId
});
},
},
};