Those crosslinks are generally also formed from covalent bonds, which are interactions where atoms share electrons and generally require a chemical reaction to make or break.
Because their molecules can shift their crosslinks around on the fly, the materials are stretchy, can repair themselves quickly, can dissipate excess energy, and are usually soft.
医学百科 The Medicine Book (Big Ideas Simply Explained)
If the penicillin is present while bacterial cells are dividing, the beta-lactam rings bind to the crosslinks while they are still under construction, preventing the completion of cell division.