This contribution presents results of a Particle-in-Cell simulation of ion beam acceleration via the interaction of a petawatt 25 fs laser pulse of high intensity (up to ~1021 W/cm2) with thin hydrocarbon (CH) and erbium hydride (ErH3) targets of equal areal mass density (of 0.6 g/m2). A special attention is paid to the effect that the laser pulse polarization and the material composition of the target have on the maximum ion energies and the number of high energy (>10 MeV) protons. It is shown that both the mean and the maximum ion energies are higher for the linear polarization than for the circular one. A comparison of the maximum proton energies and the total number of protons generated from the CH and ErH3 targets using a linearly polarized beam is presented. For the ErH3 targets the maximum proton energies are higher and they reach 50 MeV for the laser pulse intensity of 1021 W/cm2. The number of protons with energies higher than 10 MeV is an order of magnitude higher for the ErH3 targets than that for the CH targets.