Hiya @aleksandarpejas and welcome to the forums.
Examples of Bootstrap 5’s Pagination component here:
I just played around with the Pagination component that is pre-built in BSS which you will find in it’s own category in the Components list, and it works pretty nice. I duplicated one of the link numbers and changed the Value (in the Options panel) to … and then disabled it just above that Value box. Then just put the link numbers you want on either side of that.
You will need to do this for each page, but you can copy and paste it from the first one and then just alter then numbers and links. I don’t know if there’s any easier way to do it, I don’t think there’s any automatic setup for it so just do the first page till you have it like you want it, then copy that component to the next page and alter your numbers and links until you have them all done.
You can put whatever numbers/names/etc. for each link that you want, there’s no required order at all so experiment with it a bit and I’m sure you’ll work it out.