Programming Atmega328pb not always work

Did you load Arduino isp sketch from the file>examples
Once it is loaded then from tools> select programmer usbasp. Your target ATmega 328 p/b variant to be selected and connected to the usbasp. Once connected you then select tool> burnbootloader.