There are so many devices available to enable silent practice. This is my preferred method. It enables line in, headphone out, multi effects, amp emulation, compression, built-in drum machine and battery operation as well as mains. It sounds way better than you'd expect for such a small amp and I've used it outdoors in small gatherings. I use it a lot for silent practice because it's light, convenient and sounds great through headphones.
https://www.roland.com/au/products/micro_cube_bass_rx/
https://www.roland.com/au/products/micro_cube_bass_rx/