Here you find the example of the LWC template and its controller
<template>
<template if:true={recordId}>
test
</template>
</template>
import { LightningElement, api } from 'lwc';
export default class Testing extends LightningElement {
@api recordId;
connectedCallback() {
console.log('connected===============');
console.log(this.recordId);
}
renderedCallback() {
console.log('rendered------------');
console.log(this.recordId);
}
}