Note that, if using a zener or TVS for D1, then D2 and the capacitor aren't necessary. Handy if you don't have the power rail on board!
BTW, the diode only needs to handle what current the transistor sinks. 1A rectifiers may be overkill -- no, it doesn't hurt anything to use them, and maybe you're using them elsewhere in the design so it's just adjusting quantities, not adding more BOM items -- that's always nice.
But just to say -- if the relay coil or solenoid is only like 50mA, then a 2N3904 and 1N914 will more than suffice.
BJTs are a bit old school, though still relevant in some applications. I wouldn't hesitate to reach for a '3904 for loads under 100mA. At power, MOSFETs are more common. (Incidentally, MOSFETs have an internal body diode that serves as D1, though you shouldn't rely on it for voltage clamping -- an external TVS/zener is better.)
These days, you'll be shopping for SMT parts; and PCBs are cheap and plentiful, and PCB design tools, easy to use (well, relatively speaking). Typical parts are S1B, ES1B (faster), B1100 or PMEG10010 (schottky), etc. Or for TVS, something like SMAJ24A is a good choice.
And, most classic parts are available in SMTs, like MMBT3904 or NDT3055L (not like a 2N3055, but the relative of an old MOSFET with a coincidental '3055' number
).
MOSFETs you don't need the series base resistor, though a series gate resistor may still be helpful to control switching speed or quench parasitic oscillation. Value depends on gate charge and drive voltage; typically you'll use something relatively large like ~1k to really slow it down, or values in the 1-100 ohm range where speed is required.
And there are protected switches, MOSFETs with protection circuitry integrated onboard, to handle over-voltage, current and temperature. (These CAN be relied on for voltage clamping!) They're very popular in automotive systems, safe enough not to need the TVS or clamp diode in most cases. Example,
https://www.digikey.com/en/products/detail/infineon-technologies/BTS3110NHUMA1/1281745Tim