How would co-authoring a paper whose main subject isn't about what I'll do in the future help me?
I'm a freshman in high school
And you’re already sure about what you’ll do in the future? I’m impressed. In any case, you shouldn’t worry too much about what your future research topic would be. I was sure I’d be a chef and ended up with a PhD in math. People’s interests vary wildly over time.
What does matter is that you have the capacity to do research at a very young age, which is impressive to anyone reading your CV when considering you for undergraduate programs or hiring you for a job. If this is a legit opportunity I’d take it even if it’s not 100% within my field of interest.