Hey there howardfromlafayette,
While there's not an option to enable the specific behavior you described, it does sound like this is the Siri Suggestions feature working on your iPhone. As you use your iPhone, Siri learns your routines, then suggests things(like songs on the Lock Screen upon pairing your AirPods) for you to play. Of course, this isn't something that occurs every time, as you already pointed out in your post.
For more details about Siri Suggestions, we found a link that goes into more depth about it: Siri Suggestions on iPhone We also wanted to provide a second link that you can use to submit any feedback to Apple for them to consider: Product Feedback
Cheers!