There is no objective "better"; it depends entirely on what you value in a handheld. Both are discontinued but have vast libraries.
Strengths: Unrivaled 1st-party library (Mario, Zelda, Pokémon, Animal Crossing, Fire Emblem, Monster Hunter); true stereoscopic 3D (on 3DS models); clamshell durability; massive library including DS backward compatibility; generally cheaper hardware/games.
Weaknesses: Lower resolution screens; single analog stick (unless New 3DS/Circle Pad Pro); weak online infrastructure; region locked.
Strengths: Gorgeous OLED (launch) / LCD (Slim) screen; dual analog sticks; powerful hardware (near-PS3 visuals); strong indie/Japanese 3rd-party library (Persona 4 Golden, Gravity Rush, Danganronpa); Remote Play with PS4; trophies; region free (mostly).
Weaknesses: Expensive proprietary memory cards; fewer 1st-party AAA exclusives later in life; shorter battery life; fragile analog sticks; no native video out on Slim (PSTV required).
Many enthusiasts own both to cover the full spectrum of 2010s handheld gems.