As long as the motor oil or engine oil is of the same weight such as 10 W 40 should use the same 10 W 40 and so on depending on the vehicle then mixing different brands of engine oil when you need to is okay.
But if you can buy the same brand of motor oil it would be best to do that instead of mixing the two brands of motor oil especially if your vehicle is still under warranty.
If your car is just an old beater car that is not worth all that much then mixing the brands of motor oil is okay and I've done it myself.
It's better to have some oil in the vehicles engine than none at all even if it's a different brand.
I prefer to use the same brand of motor oil but sometimes you need some more between oil changes to top off the engine oil.
So you get a different brand of motor oil if you cannot find the same brand in the store you're in.