ABSTRACT To understand giant planet formation, we need to focus on host stars close to $M_{\star }{=}1.7\, \rm M_\odot$, where the occurrence rate of these planets is the highest. In this initial study, we carry out pebble-driven core accretion planet formation modelling to investigate the trends and optimal conditions for the formation of giant planets around host stars in the range of $1\!-\!2.4\ \rm {\rm M}_{\odot }$. We find that giant planets are more likely to form in systems with a larger initial disc radius; higher disc gas accretion rate; pebbles of ∼millimeter in size; and birth location of the embryo at a moderate radial distance of ∼10 au. We also conduct a population synthesis study of our model and find that the frequency of giant planets and super-Earths decreases with increasing stellar mass. This contrasts the observational peak at $1.7\, \rm M_\odot$, stressing the need for strong assumptions on stellar mass dependencies in this range. Investigating the combined effect of stellar mass dependent disc masses, sizes, and lifetimes in the context of planet population synthesis studies is a promising avenue to alleviate this discrepancy. The hot-Jupiter occurrence rate in our models is $\sim 0.7\!-\!0.8~{{\ \rm per\ cent}}$ around $1\, \rm M_\odot$ – similar to RV observations around Sun-like stars, but drastically decreases for higher mass stars.