Salams,
Numbers in arabic appear to to be a bit challenging- below link may be useful if you're trying to decipher all the various rules regarding both the number and the noun that follows.
https://www.fluentarabic.net/numbers-in-arabic/
Tried to post this in 202 but I don't think I have access. Can't verify if the info is accurate but seems to be in line with what we've studied so far.
Imran