There's no law or rule that says you have to file your 2017 return before you can do your 2018 return.
However, it's best to prepare your 2017 return first, if possible. This gives you several advantages:
- You'll be able transfer your 2017 data to your 2018 return, which saves time and prevents data entry errors;
- You'll have the answers to certain program questions that involve last year's return (and you'll avoid having to amend your return if you answered them incorrectly);
- You'll be able to use the AGI method to electronically sign your 2018 return so you can e-file it.
If you're not able to file your 2017 return before filing your 2018 taxes, no biggie. Just be sure to review your 2018 return after you've filed 2017. Should your 2018 return need corrections based on info in your 2017 return, you may need to amend.