if it's the central bank buying assets from other banks, such as in QE - then the central bank also creates the deposit "out of thin air", thus effectively paying for the assets to the commercial bank with a newly created deposit into their reserve account. base money increases
when banks buy assets from other banks - new deposits do not get created, as the payment happens by moving funds between the commercial bank's reserve accounts at the central bank thus, it's base money movements/reallocation, not creation