There are a couple ways to prepare for the last few seconds of a basketball game.
One way is to practice shooting the game-winning shot from various positions on the court, over and over, under the most challenging circumstances you can simulate. Off-balance, fatigued, one-handed, falling out of bounds, with your non-dominant hand, etc.
You could practice catching alley-oop passes, rehearse special plays with your team, try to improve your vertical leap every month, work on your explosiveness, and study the ball-handling greats for ideas on how to move the ball towards the basket using various tricks to baffle your opponents (and delight the crowd).
Or you could focus on playing a strong four quarters so none of those things are needed.