RowID in Google Sheet

The app creates a new row for each new user with corresponding Row ID. If the user creates a sub-row in a new file, I need the Row ID to be copied and appear for proper user identificaion. The problem is how to make a block that would identify the Row ID of the current user and how to copy it to the other sheet where the sub-row was created. Sorry, I am a newbee so I need all your help right now. Thanks!

Create a variable called something like UserRowID which saves the Row ID. When the user creates a new row store that variable in the sheet with the subrow.