It doesn’t matter.
I have a personal preference that I floss before I brush. I feel it is simpler and more logical.
Why I floss first
Flossing will loosen and remove food and plaque off your teeth where the brush cannot access. I imagine there is lots of loose gunk just floating around the teeth and gums after flossing. If I brush afterwards, it will be more effectively suspended in the toothpaste/saliva mixture compared to just rinsing. It is just something psychological for me to minimise the disgusting stuff in my mouth.
The important thing is that you do it.