Lifecycles create entry or update in another content on user register or login?

i want to add another entry for instance when a new user is registered i want to append this user to class-room which holds a user list reference fields. and when they user logs in i want to store his IP address in another content say user-status. i was able to track the creation by

		  models: ['plugin::users-permissions.user'],
		  async afterCreate(event) {
			// afterCreate lifeclcyle
			console.log('afterCreate index ');
		  async beforeCreate(event) {
			// beforeCreate lifeclcyle
			console.log('beforeCreate index ');

can someone let me know how do i now attach this user that was created as a reference to another content type field ? basically append it to a multi reference field in another table. Or guide me to documentation?

System Information
  • Strapi Version: 4.5.2
  • Operating System: windows 10
  • Database: myssql
  • Node Version:
  • NPM Version:
  • Yarn Version:

Please suggest someone or exiting example?