It's really mostly luck. You can play perfectly and still lose. That's just how poker is.
Where skill comes in is being able to maximize value when you are ahead and minimize losses when you are in a bad spot.
They say you shouldn't be results oriented and over the long run you will win if you play correctly. That's not really 100% true because ultimately you play poker to win money. If you get unlucky in one huge pot, that is gonna be a deep hole to climb out of. If you are ok with losing and you just wanna feel good that you played well... ok then.
I dunno about you, I rather be lucky and win money than good and lose money.