Adaptive beamforming is a crucial technique for enhancing the performance of 5G networks by mitigating interference and improving signal quality. This paper investigates the performance of a modified Least Mean Squares (LMS) algorithm with a variable step size for adaptive beamforming in smart antennas. The proposed algorithm dynamically adjusts the step size based on the instantaneous error, leading to improved convergence and reduced steady-state error compared to the standard LMS algorithm. The performance of the modified LMS algorithm is evaluated through simulations, considering various scenarios with different signal-to-noise ratios (SNRs) and angles of arrival. Simulation is done by using MATLAB software with uniform linear array as array geometry. The results demonstrate the effectiveness of the proposed algorithm in achieving faster convergence, better beam pattern formation, and lower mean squared error (MSE).