Usage of cookies … how to do it legally?

Since the enactment of the GDPR, lots of different cookie banners (or consent banners) are used on websites. And there is a large variety of these banners regarding their content and usage. On the one hand, there are small sized banners, which only have to be confirmed. On the other hand, there are consent banners with a lot of information and customizing options, most people do not understand.