I want to create a boundary or a polygon from these XYZ points by selecting only the outermost points that form the boundary.
I know these can be done in manually but I wanted to know how to do this automatically.
You can use the tool "Minimum bounding geometry". Just use your point layer as input and press run: