Asking the right question is an art form that is painfully underappreciated.
Pivot!
@MostlyHarmless I had this experience when I was seduced by an AI answer Google gave me with code. After I discovered that the code had a bug, I coded it myself. Then I smacked myself and searched for (and found) the function I wanted in an API where I first expected it to be.
Duh.