"bad iMac mini" ... what does that refer to?
Get a TB NVMe SSD enclosure and purchase a compatible NVMe SSD. This provides an upgrade path when you want to increase your storage by simply replacing the NVMe SSD. I think there is one company selling a TB5 version now. Pricey but the performance is insane.
The prototype external drive achieves speeds comparable to internal NVMe Gen 4 drives, which cap out around ~7.3 GB/s— and there could still be room for improvement.
www.tomshardware.com
If you go the TB5 route you need to purchase the Pro version of the Mini that has TB5 ports.
A TB3/4 enclosure would likely have sufficient performance for what you are doing and they can be purchased these days for less than $50.