how to add a role from a user ID and a role ID

I would like to assign role using user ID and role ID, but in my research I could only find the following example.
let role= member.guild.roles.cache.find(role => role.name === "role name");
member.roles.add(role);

Sorry for the rudimentary question.
Was this page helpful?