Theres actually a thing ppl talk about with boners on leg day, but its more from blood flow and a release of endorphins.
I don't know what has changed over the years, but I did a lot of reading into this about 15 years ago.
The testosterone boost you get from exercising and lifting heavy only lasts about a hour and your testosterone returns to its baseline after, sometimes in as little as 15min. Exercise in general will help boost testosterone consistently, but if we're talking about someone who already has been exercising regularly and has low testosterone, then your not going to be able to squat your way there.
As far as what constitutes heavy, it's different for everyone. My personal opinion is a heavy weight is something that's going to make you hit failure before 7-8 reps. 3-6 would be the range I consider heavy without maxing out