Nanoscale Engineering of Magnetic Textures in the Layered Magnet CrSBr Using Electrons and Helium Ions