I'm often asked what is best: to do a post-doc after your PhD, or directly go for a faculty position. As with all answers: it depends. Here are a few factors it depends on.
1. Job openings
First of all, if you are doubting between a post-doc after your PhD or a faculty position, then I'm assuming you have seen some job openings you are considering applying to for both cases. If you are planning to stay in academia, and you don't see any faculty position advertised in your region (and are not considering moving), then you may have more options in terms of funding and scholarships to do a post-doc. The first condition to consider is thus that both opportunities should be available to you, and you consider yourself a suitable candidate for both.
2. Your career plan (content-wise)
If you want to delve deep into a topic different from your PhD research, a post-doc is the best option: you'll get to dedicate 2 years (or a different period of time) to work on a single topic. As a faculty member, it is harder to carve out a longer period of time to dedicate yourself to a new topic.
On the other hand, if you want to start working with graduate students and want to spend a significant portion of your time on teaching, then a faculty position may better fit you. Think about your career plan in terms of contents.
The requirement of "location" fits nicely together with the "job openings" requirement.
There are different things to consider here. First, if you want to gain international experience and then return to your home country or alma mater, a post-doc for a fixed period of time abroad may be the best choice. If you are interested in moving to another university, then you may want to "try out" the lab and its environment with a post-doc project, before you apply for a faculty position.
Some countries do not have post-doctoral positions - in that case, your location may dictate that a faculty position is your only option. Think about your career plan in terms of where you would ideally want to do what.
4. Future career requirements
If you take a faculty position, will you have to go through the tenure track system? If so, what are the most important requirements on the tenure track system: the amount of funding you bring in, the number of students you've supervised, your number of publications...?
If funding is the most important element, go for a post-doc first, so that you have extra time to gain experience with writing proposals.
If your number of publications is the most important element, go for a post-doc first, so that you have time to publish the papers from your PhD research, and do a major effort in publishing the papers from your post-doc.
If students supervised and teaching is the most important element, go for the faculty position and work on developing your teaching skills.
5. Scholarship prestige
If you want to build your resume after your PhD, going abroad for a post-doc (provided that your life situation won't suffer from it) and applying for a prestigious scholarship, may set you up for success later in your career. Excellent options here would be an EU scholarship of a Fulbright scholarship.
6. Talk to your career counselor
Every situation is different. Know that your university has the services to help you make the right decision for your career after your PhD. If you are doubting, make an appointment with your career counselor and talk your options through.
When you consider these elements for your situation, you will be able to make an informed decision. And remember: a post-doc or a faculty position are just two of many many options you have after your PhD. And after your post-doc you can apply for a faculty position, do another post-doc (I had 3 post-doc contracts before getting a tenured faculty position in the Netherlands), or go in a different direction altogether. You build your path - nothing is set in stone.