Overheating isn't just a concern for your CPU and graphics card; even your unassuming SSD is prone to it. While overheating storage drives wasn't a problem a few years ago, Gen4 and Gen5 NVMe SSDs can heat up under load, depending on the drive model, your PC's airflow situation, and even which M.2 slot you pick. Most SSDs are designed to run under 70℃, beyond which they can throttle and reduce performance. Fortunately, there's a lot you can do to give your drive the best chance of avoiding overheating, thereby extending its lifespan.
5 Ensuring enough airflow inside the PC
Might be time for some upgrades
The first thing you should do to reduce the SSD temps is figure out the gaps in your PC's airflow setup. Are you running without a decent number of intake and exhaust fans? Maybe you haven't installed them in the right configuration or optimized the fan curves properly. Your case might not have enough internal volume to adequately cool components like the SSD and VRMs.
Consider adding more fans, ideally larger ones, that can increase the air intake inside the PC. You can also look at buying a new case for improved airflow, and possibly for larger fan mounts. It's also important to leave enough space behind the case (from the wall) so it can exhaust hot air without issues.

Corsair 5000D Airflow
The Corsair 5000D Airflow is an impressive chassis with a simple, yet elegant design. The front panel has large cut-outs for allowing mounted fans to pull in cool air. A large side tempered glass window will showcase all the components installed within and support for up to a 360mm radiator ensures everything will run cool.

Related
5 airflow mistakes I see in almost every mid‑tower build
They might seem small, but these airflow mistakes are a strict no-no in any mid-tower PC
4 Removing obstructions to the airflow
Make the best of what you have
Suppose you already have a good number of fans for intake and exhaust, and you've configured your fan curves correctly. In that case, you should look into eliminating obstructions that can disrupt the airflow. For instance, a bunch of wires loosely hanging in front of the intake fans, or blocking the area under the graphics card, can hinder air intake. Route them in a way that they don't give rise to hotspots.
Cleaning the PC regularly to avoid dust deposits is also a simple yet effective way to remove one of the biggest sources of overheating. It will benefit not just your SSD, but your entire PC. Often, you don't need additional hardware to keep your PC components from overheating. Optimizing what you already have can solve most of the issues.
3 Keeping up with firmware updates
Outdated versions might cause problems

While outdated SSD firmware might not always lead to overheating or performance issues, it doesn't hurt to keep your hardware updated. Manufacturers release firmware versions to improve maintenance functions like TRIM, wear leveling, and garbage collection. Losing out on these updates could sometimes create problems with the optimum functioning of your SSD controller, leading to an overworked, and hence, overheating SSD. An occasional firmware check can eliminate this source of overheating without a lot of effort.

Related
How to update your SSD firmware on Windows
It's a fairly simple process to ensure the smooth performance of your SSDs
2 Not installing it under the graphics card
Your SSD might be cooked

Installing your main SSD beneath the graphics card could be another source of overheating. Once you install a beefy graphics card in the primary PCIe slot, it can easily block the M.2 slot beneath it from getting enough air. Under especially demanding loads, this can lead to higher-than-necessary SSD temps. Unless you have bottom intake fans, your SSD in the slot under the GPU might run consistently hotter than it's designed to.
Always install your primary SSD in the M.2 slot above the graphics card slot, so that you're giving it ample fresh air coming from the front or side intake fans. You can reserve the other M.2 slots for secondary SSDs that aren't always under load. For instance, they might contain your media collection or old backups — stuff that you don't access every day.

Related
PC airflow guide: How to strategically set up your case fans
You'll need to set up proper airflow inside your PC case for optimal cooling. This guide will show you how.
1 Using a heatsink on high-end SSDs
A given for Gen5 drives
PCIe 5.0 SSDs almost always come bundled with a heatsink or have a heatsink variant, at least. This is because these high-performance SSDs are the most prone to overheating under intense workloads. Even if you don't have a Gen5 SSD yet, some high-end Gen4 SSDs can run quite hot without a heatsink. Hence, it's best to install a heatsink if your SSD or motherboard came bundled with one.
In case you spot high temps on your SSD, and don't have a bundled heatsink you can use, get one from Amazon for around $5-$10. It'll keep your SSD running cool by dissipating the excess heat into the PC, from where it can be pushed out.

Related
5 signs your NVMe SSD might actually need a heatsink
You better notice the signs before your SSD starts cooking (in the worst way)
Keep the temps low and the performance high
Avoiding overheating can give your SSD the best chance to provide the performance it's capable of. This is especially true of blazing-fast Gen5 SSDs that can reach speeds of 14,000 MB/s now. Installing a heatsink, improving your PC's airflow setup, and keeping it dust-free will give your SSD (and the other components) room to breathe. Even keeping the SSD firmware updated can do its bit.