I'd say go for whatever you find more enjoyable. I remember my gym had a punching bag which I used to practice with. I had no idea at the time (I was around 28-29) but a girl much older than me who returned back to the gym asked if I still boxed.
I found this surprising because I never really mentioned to her about it, only spoke to her for a few minutes here and then, and I mostly kept to myself at the gym. I told her no, I stopped boxing. I didn't realize it then but there was quite a disappointment from her. I do think something about being able to "fight" turns girls on probably?
Regardless do whatever feels most enjoyable for you. Sustainability is the most important thing, it's a life style. Lifting weight to me feels really good, it's a mental catharsis, and gives you an aesthetics you're proud of. Boxing gives you much better cardio stamina, as I found even 10-15 minutes of practicing on the punching bag pretty demanding vs 1-3 hours of lifting weights. Honestly I'd say boxing might be a bit more healthier for the heart since you can do HIIT trainings with boxing. I think HIIT training on lifting weights is stupid and something like Crossfit. Again, you can also supplement few extra minutes on the side with weight lifting so really it's what you find more enjoyable.
Personally I'd like to do both if I get the chance, but that's very time consuming and not realistic, if I had to choose only one it'd be weight lifting and maybe some light shadow boxing inside my house.