You can use a ratcheting cargo bar like this with a net: https://www.amazon.com/dp/B000I2SWXC
Or use the ratcheting cargo bar to keep a trunk organizer like this in place in the back of the bed. Put the cargo bar horizontally about 18 in the back of the bed, and it will hold the organizer at the back end of the truck.
Organizer: https://www.amazon.com/dp/B08DFLFTBQ/
In fact, the organizer has hooks and straps on the outside ends which can be secured to the cargo hooks in the truck, you wouldn't even need the ratcheting crossbar.
Nice to have options!