The intragrain pinning in high-$T_c$ superconductor compounds Y$_{1-x}$RE$_{x}$Ba$_{2}$Cu$_{3}$O$_{7-delta}$ with low concentration of RE (La, Ce, Pr) was investigated. Magnetic and transport measurements reveal that the pinning is maximal for the concentration of heterovalent RE such that the average distance between the impurity ions in the plane of rare-earth elements close to the diameter of Abrikosov vortices in YBCO.