We report on the self-induced electron trapping occurring in a ultracold neutral plasma that is set to expand freely. At the early stages of the plasma, the ions are not thermalized follow a Gaussian spatial profile, providing the trapping to the coldest electrons. In the present work, we provide a theoretical model describing the electrostatic potential and perform molecular dynamics simulations to validate our findings. We show that in the strong confinement regime, the plasma potential is of a Thomas-Fermi type, similar to the case of heavy atomic species. The numerically simulated spatial profiles of the particles corroborate this claim. We also extract the electron temperature and coupling parameter from the simulation, so the duration of the transient Thomas-Fermi is obtained.