If it’s either/or - than 100% do the most advanced classes offered by your school that you can handle. That’s the ONLY information that will end up in the transcript that is sent to the colleges you are applying to.
AFTER you have been accepted, it all depends on the college you enroll into. SOME (e.g. state colleges) might accept AP credits very liberally and possibly allow you to graduate half a year early. So the AP credits can be a cost-effective.
Many very selective colleges, will NOT let you use your AP credits towards whatever “major” you eventually choose - but they can still come in handy. You might be able to use them to skip entry level classes in some “general education” areas, or might use them as “electives”,… This can be helpful if you are running into scheduling conflicts some semesters and wished you didn’t have to take class “x” anymore so that you could instead get into class “y”.
So - in summary: ONLY if you have nothing better to do, and ONLY if you strive to graduate early, go ahead prep for out-of-school AP exams. Else, it’s infinitely more important not to burn yourself out.