This is what I use in my Silverado and it's almost the exact same thing.
Tuffy Security Products - Ram Rear Underseat Lockbox - 2019-23 Ram 1500; w/ Crew Cab
tuffyproducts.com
I can fit a few rifles and pistols in there very easy but there is metal on the sides (bottom has carpet) so I would recommend putting a few towels in there if you ever load it up.
If it's just a pistol then any of those locking center consoles are probably fine but I prefer this. I put other supplies in there and lock it whenever I don't have guns in it anyways and stuff stays safe and secure and doesn't look like crap
Also could possibly use the in floor storage boxes in back? Throw a lock on them or get something like this?
Tuffy Security Products - Locking Lid | In-floor | RAM Trucks | 2019-2025 | Crew Cab; {Exc. Classic}
tuffyproducts.com
I am curious why a locked glove box wouldn't be considered legal but a different lockbox would?