2N2222A by Texas Instruments is a small signal NPN bipolar junction transistor (BJT) with a max collector-emitter voltage of 40V and a max collector current of 0.8A. It is commonly used for switching applications due to its fast turn on/off times (35ns/285ns) and high transition frequency (300MHz).
1N4148WT by Onsemi is a single rectifier diode with a max output current of 0.3A and forward voltage of 0.72V. It has a small outline package style, matte tin terminal finish, and operates at temperatures up to 150°C. Ideal for applications requiring fast reverse recovery time such as power supplies and signal demodulation circuits.