I have started studying quantum mechanics and have realised that we can solve the Schrodinger equation for a particle's wave function if we know it's potential energy function. But the potential field in which a particle is, is determined by the presence of other particles, but their positions themselves are not definite (they have probability to be here as well as there). Then how can we fix the potential in which the particle under study is present?
A fixed potential is often just an approximation to make things simple and solvable.
In hydrogen, the proton is so much more massive than the electron (1936 times!) that to a first approximation you can consider it stationary and thus consider its electrostatic potential to be fixed in space.
If you don’t like that approximation, then you formulate the Schrodinger equation in a way that takes the motion of the proton into account. In this analysis, the potential then depends only on the separation distance between the proton and the electron, so the Schrodinger equation simplifies again.
In multi-electron atoms, people sometimes make approximations where they consider the inner orbitals to provide an averaged potential that affects the outer electrons. But for more accuracy, you would have to numerically solve a multi-particle Schrodinger equation where the potential energy terms include all the inter-electron repulsions.
So in many realistic situations, fixed potentials don’t exist. They’re just something you learn about in an introductory quantum mechanics course.