Planet formation is directly linked to the birthing environment that protoplanetary discs provide. The disc properties determine if a giant planet forms and how it evolves. The number of exoplanet and disc observations is ever-increasing, however, it is still not possible to directly link these two populations, therefore a deep theoretical understanding of how planets form is crucial. Giant planets are not the most common exoplanets, but their presence in a disc can have significant consequences for the evolution of the disc itself, the forming planetary system, and it also offers more chances of observational features in the disc structure. We perform numerical simulations of planet formation via pebble and gas accretion, including migration, in a viscously evolving protoplanetary disc, with dust growing, drifting, and evaporating at the icelines. We discuss the most favorable conditions for giant planet formation, however, we conclude that there is no specific initial parameter that leads to giant planet formation, but it is mainly the outcome of a combination of beneficial and non-limiting factors. This also implies that the diversity of the exoplanet systems is the product of the intrinsic diversity of the protoplanetary discs and it is crucial to take advantage of the increasing number and quality of observations to constrain the disc population properties and ultimately planet formation theories. Additionally, we present how the disc dust mass evolves in our models after a giant has formed and compare this with the dust mass we would estimate for these discs through observations. We conclude that there is no disc mass budget problem and the discrepancy between the mass estimates of the observed discs and the observed exoplanets is a product of the underlying assumptions.