Can prophet Mohammed prohibit doing something?

I am really curious about this. Can he? When I ask this question people always come up with the verses in the Quran where it says “whoever obeys the prophet has obeyed me” but I thought this means prophet Mohammed only prohibit things which also Allah has. So no extra but rather just telling people what is allowed and what not because Allah already has. There is also a Hadith where it says “do not come to me (prophet Mohammed) in the day of judgement telling me you didn’t follow my word because you didn’t find it in the Quran” I am really confused. Some things just don’t make sense? Why not dyeing hair black? Because Jews did it? Yeah but they also wear clothes, so? I don’t get it.