The flashbacks from The Book of Boba Fett begin sometime in the year 4 ABY, not long before the rebels blow up the Death Star and Luke turns Anakin back to the Light Side.  It's then assumed that Fett spends three or four years living with the Tusken tribe before killing Bib Fortuna in 9 ABY, just after helping to protect Grogu. The ensuing battle for Mos Espa with the Pykes occurs not long after this.