Asignar roles al usuario

use App\Models\User;

$user = User::find(1);

$user->roles()->attach($roleId);
Brainy Beetle