FIXED
The problem was that in the example used the alpha version of bootstrap5 and I'm using 5.1.3.
In that time bootstrap made some changes on what classes should be added to buttons etc.
So you should write
this:
<button class="btn dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-haspopup="true"
instead of this:
<button class="btn dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true"
And also other html elements should be getting specific classes like the margin classes
ms-1 ms-2 ....
on the input elements
So in my case it wasn't a problem of adding
jQuery.js or popper.js
to my angular.json
like mentioned in other threads: https://stackoverflow.com/search?tab=Relevance&pagesize=30&q=popper.js%20bootstrap&s=144706d6-c9be-4120-b105-c37f2b848352
It was just the default bootstrap5 classes.