handleOnLoad() {
let name = this.template.querySelector('.name').value;
alert(name);
}
This will work.
BUT above approach is not good. You can get all the values based on recordId as below
handleOnLoad(event) {
var record = event.detail.records;
var fields = record[this.recordId].fields; // record['0010K000026Y******'].fields;
const accName = fields.Name.value;
alert(accName);
//const myfieldVal = fields.myfield__c.value;
//alert(myfieldVal);
}