Beware, there is a lot of actual safety equipment that goes into a MagSafe connector that probably isn’t in the knock-offs. Moving 5 A of current can cause a spark and start a fire right in your lap.
I have a "bootleg" magsafe usb-c cable for my 2018 "worst model in history" mbpro with emoji keyboard.
When I bought it i did the research and random magnetic cables on amazon were reviewed along the lines of "this burned my laptop". I ended up getting an (expensive-ish) one from my local apple dealer.
You don't have to use a counterfeit charger with your after-market usb-c to magsafe-2 cable. I use it with a newer real apple charger with usb-c (... since this is an older magsafe-2 macbook, not a new magsafe-3 one, and I don't want to buy any more magsafe-2 non-detachable-cable chargers). The only downside is that it's a bit dumb and always tells the laptop it has 60W, so you need to use >= 60W usb-c charger, and your laptop will only use 60W of it.
That first link describing how magsafe 1/2 work is what convinced me it should be fine :)