Hi,Input your car's info into this electronic parts catalog, find the part & part # needed, shop using the part # for a replacement. BMW doesn't make the cap - there are OEM vendors (Rein, Febi, Vaico).
That doesn't look like an oil filler cap, to me - rather, an expansion tank cap (the larger/upper one in your photo). Knowing what car you have would help. Oil cap is in this photo: