Accessing Twitter data for analysis depends on your question and time period. For Twitter searches (keyword or hashtag), data older than seven days cannot be retrieved without paying a fee. You can collect data going forward in time. If you need to extract tweets from an account, you can collect data going back and going forward in time. Twitter's Developer Agreement and Policy has details about what you can do with the data.
More details are available from Where to Get Twitter Data for Academic Research, an excellent guide written by the creators of Social Feed Manager (George Washington University Libraries).
Twitter Data Sets
Social Media Data from Multiple Sources (Twitter, Facebook, etc.)
Tools that collect social media data
Advanced Collection Methods — coding required
Social Media Research Toolkit (Ryerson University) created a directory of options for locating and extracting social media data.