How to assign member role directly after signup is complete in code?

Typing in…
→ Login Management <—
→ Login-System <—
→ Login System <—
→ Login-Management-System <—
→ Login Management System <—
→ Login-MGM <—
→ Login MGM <—

…into the Velo-Forum-Search and you will surely find some posts about your wished functionality. I posted numerous posts about a Login-System, which includes your wished function…

Some of the mentioned posts about ROLES and BADGES…

And there is surely even more stuff about this.