According to oracle documentation:
Specify a database’s database identifier (DBID) when restoring a control file or server parameter file.
Restrictions and Usage Notes for the SET DBID Command
You should only run the SET DBID command in the following specialized circumstances:
- You are not connected to a recovery catalog and want to restore the control file or server parameter file.
- You are connected to a recovery catalog and want to restore the control file, but the database name is not unique in the recovery catalog.
When you restore the control file, you must use the SET
DBID
command to identify the target database. The DBID is used to determine the location of control file autobackups.
You can get the DBID from the following query:

Or when you run the rman , connection to the target database:

If you are using RMAN catalog, and you have a clone of your database with the same DBID, how the RMAN will differentiate between them?. Here you need to change the DBID of the cloned database using DBNEWID utility to avoid confusion.