Is a knight or two pawns better in an endgame

ChessWoman101

If the position is closed, it would be best to have a knight. open, id prefer a bishop