Can I access the recordId directly in a LWC child component instead of passing it from parent component?
I put @api recordId in child component but im getting undefined.
No. Child components must receive their recordId from the parent. Only top-level components get the recordId from a Record Page view.