[A] + 不如 + [B]
[A] + 不如 + [B] + [adjective]
[clause],+ (还) 不如 + [verb phrase]
A 不如 B means A is not as good as B. On its own it compares overall; an adjective after B names the quality.
不如 always leans towards B. The adjective names something good that B has more of – 好, 快, 便宜, 方便, 漂亮.
After a clause describing a poor option, (还)不如 + verb phrase puts forward a better one: "you might as well", "it'd be better to".
The second example pairs it with 与其 "rather than", a fixed frame with its own point.
没有…那么 and 不如 both mean "not as". 没有 is neutral and takes any adjective; 不如 adds the judgement that B is the better one.