© 2023 World Scientific Publishing Company.In this research paper, we take into account the (2+1)-dimensional Kadomtsev-Petviashvili equation which is important in the soliton theory of nonlinear physics. To get the desired soliton solutions, the modified F-expansion method using the Riccati equation which has many solution functions, as well as the modified generalized Kudryashov's method, had been effectively implemented. One of the reasons for the preference of the methods is that the proposed methods have been widely used before and they have not been applied to this problem. First, the wave transform is applied to the considered nonlinear partial differential equation (NLPDE), the nonlinear ordinary differential equation (NODE) form and the balancing constant are determined. The next step is to use the auxiliary equation depending on the proposed method to find the solution of the NODE form and to obtain the linear algebraic equation system. The solution of this system gives different solution sets for unknown parameter values. Then, soliton solution functions are constructed by using the suitable solution sets. After testing and confirming that the obtained solution functions satisfy the main equation, the three- and two-dimensional illustrations are depicted.