Good question, to which you won't know the answer until after you try!
Orthotics treat problems with your feet. Your knee problem may or may not have anything to do with it, but certainly a foot problem could aggravate a knee problem.
Years ago when I had some ongoing soreness, and since it would be covered under my health insurance, I went to a podiatrist who gave me custom orthotics. Eventually the soreness went away but I figured it likely would have gone away anyway. I wore the orthotics for all walking, and was happy.
Then I had a stress fracture for other reasons. After it healed a new set was made, but again I wasn't totally convinced they were doing anything.
In 2018 after my camino, I developed a mild but nagging soreness on the inside of my arch. Again I tried various rest periods, higher arch support and lower arch support (over the counter versions), no arch support, sandals, different shoes, etc. The soreness remained for almost a year and I was worried about what would happen on my next camino. Finally I went to the podiatrist who thought I needed new orthotics with different support. I was skeptical, especially when I saw what a tiny difference there was in the shape of the new arch support.
To end the story happily, within a few week the soreness went away for the most part (there is sometimes a hint, so that is probably a susceptible place on my foot). Who knows if the orthotic was the cure? It wasn't even a severe pain, but I am walking much more comfortably now.
So sometimes they help and sometimes they don't. They are expensive so, you need to guess if they are "worth" it. I do think it is worthwhile to consult with a podiatrist, as well as the knee doctor as
@Kanga says.