2013 Ford F150 - Clunker

My ecoboost is making a clunking sound and went to give it gas in traffic at a stop light and nothing happened. Then I jiggled the shifter and it proceeded normally. What’s up with this issue I am having?