A better way would be to use a combination of parent() and within.
cy.contains('Quantity')
.parent()
.within(() => {
cy.get('[inputmode="numeric"]').clear().type('123')
cy.get('.cc-1mkztvr').clear().type('123') //In case above doesn't work, find element with class name
})