In case you are interested in another approach and assuming that those urls have fixed data positions, here is a non-regex solution:
OriginalURL := "https://www.amazon.com/Taco-Burrito-Popular-Surprisingly-Strategic/dp/B07JZTBV9C/?_encoding=UTF8&pd_rd_w=kJDyA&pf_rd_p=3bfeb04e-703a-461f-b489-780480465c8a&pf_rd_r=T0F0410TSNH60D3Y6QWH&pd_rd_r=bf7a94f6-0f9f-412d-b04a-83b36174e008&pd_rd_wg=iSWZB&ref_=pd_gw_unk"
Template := "{1}//{3}/{5}/{6}"
MsgBox, % Format(Template, StrSplit(OriginalURL, "/")*)
return
; Output: https://www.amazon.com/dp/B07JZTBV9C