Problem 3.17(a) Sakurai.  See that l = 1.

ClearAll[hbar, theta, phi, r, f, x, y, z, Lsquared, Lz, display, braket, psi, psiS]

$Assumptions=(And@@(#>0&)/@{hbar, r});

x[r_, theta_, phi_] = r Sin[theta] Cos[phi] ;
y[r_, theta_, phi_] = r Sin[theta] Sin[phi] ;
z[r_, theta_, phi_] = r Cos[theta] ;


psiS := x[#1,#2,#3] + y[#1,#2,#3] + 3 z[#1,#2,#3] & ;

psi := psiS[#1,#2,#3]f[#1] & ;

Lsquared[f_] := -hbar^2 ( D[f[r,theta,phi],{phi,2}]/Sin[theta]^2 + (1/Sin[theta]) D[Sin[theta]D[f[r,theta,phi],theta],theta]) // Simplify ;

Lz[f_] := -I hbar D[f[r, theta, phi], phi]  // Simplify ;

(*unit tests*)
(*Lsquared[ Sin[#3] & ]
Lsquared[ Cos[#3] & ]
Lsquared[ Cos[#2] & ]
Lsquared[ Sin[#2] & ]*)


display = {hbar -> ℏ, theta -> θ, phi -> ϕ} ;
psi[r, theta, phi] /. display // TraditionalForm
Lsquared[ psi ]  /. display // TraditionalForm
Lz[ psi ]  /. display // TraditionalForm

braket[f1_, g1_] := Integrate[ Sin[theta] Conjugate[f1[r, theta, phi]] g1[r, theta, phi] , {theta, 0, Pi}, {phi, 0, 2 Pi}] ;
LzPsi[r_, theta_, phi_] := Lz[ psiS ] ;
braket[ psiS, LzPsi ] // Simplify