You should make sure co-op is enabled. If it is, then make sure you have a active Xbox Live or Xbox game pass ultimate (not core) subscription active. If you have that as well, try using a direct Xbox invite. If that doesn’t work either, try joining the person through their profile. If that won’t do anything either i can’t help you.