Mellett means "next to" or "beside". It is direction-specific, referring to an object that's left or right of something else. On the side.
The suffix -nál/-nél means "at" or "by". It's not direction-specific but only refers to the immediate vicinity of an object.
If you're talking about an object that doesn't have specific sides, like a tree, then -nál and mellett have the same meaning. But if something has defined sides, like a car, then "az autó mellett" would mean that you're somewhere by the doors, while "az autónál" just states that you're somewhere close to the car.