It really depends on the context and players in question. There's a difference between players who can be elite at both, and take what the defense offers; players who can score goals regardless of who they play with; players who depend on playmakers to set them up; players who are elite playmakers but who struggle to score goals; and players who get assists due to playing with better players.
In general goals are more valuable, but using this as a standard to compare the production of two players is overly simplistic. A player with 35 G and 90 PTS is not automatically worse than a player with 50 G and 90 PTS. 35 goals is still high end goalscoring, and if the player is a big play driver on his line, playing with complementary players who don't create much on their own, then in general his points are indicative of the offense he creates. If the 50 goal scorer is also a line driver playing with complementary players, then I would be more inclined to pick him as the better player, but if he's more of a shooter that just gets into soft areas to score and doesn't carry the puck much, I would likely prefer the 35 goalscorer to the 50 goal scorer as the 50 goal scorer ends up relying more on his teammates to get him the puck to score. The argument many use for goals over assists is that the playmaker is reliant on other players to finish his plays, and so the final result is out of his hands. But here, it's the 50 goal scorer that is actually more reliant on others, as he needs them to get him the puck. If teams can prevent that from happening, they can shut that player down. Meanwhile, the 35 goal scorer has shown he can do both at a high level, meaning he can take what defenses give him, making him harder to shut down. For these types of players, I don't think lower goal seasons are necessarily a sign of being any better or worse, it's just how the games played out for them. In general, players who can both score and create plays at a high level are going to be more valuable than players who are only elite at either.
As we go down the line though, I think an elite goalscorer who isn't a playdriver is still more valuable than a playmaker who isn't a good goalscorer simply due to the rarity of those goalscorers, and when we get into complementary players instead of your stars, the goalscorers are even more valuable because playmakers at that level aren't guys you want dominating the puck over your star players anyway.