Best I can figure, there are two possible timelines to follow for the movies. Both start out with the same two films but diverge from there.
Timeline A
- X-Men: First Class (2011)
- X-Men: Days of Future Past (2014) (the Sentinels are created)
- X-Men Origins: Wolverine (2009)
- X-Men (2000)
- X2: X-Men United (2003)
- X-Men: The Last Stand (2006)
- The Wolverine
- X-Men: Days of Future Past (2014) (Wolverine is sent back to stop the Sentinels from being created)
Timeline B
- X-Men: First Class (2011)
- X-Men: Days of Future Past (2014) (the Sentinels are NOT created)
- X-Men: Apocalypse (2016)
- X-Men: Dark Phoenix (2019)
- Deadpool
- Deadpool 2
- X-Men: Days of Future Past (2014) (Wolverine wakes up in 2023 and everyone is alive because the Sentinels weren’t created)
- Logan (2017)