You are clearly eligible for EU 261 action against UA. Write via
UA customer support with EU261 Compensation in the title. Mention your UA PNR locator, ticket numbers, the flight, date and number of passengers. Do not bring TK into the picture, what happened with TK has no impact.
I am under the impression only one EU261 delay comp can be made in this case but others may know better.
TK does owe you, at least, duty of care compensation and if you want to pursue that or EU261 delay compensation, best to post in
Turkish Airlines | Miles&Smiles for that forums experts to advise you