I have had good success in eliciting a pretty close max HR by running on a treadmill while wearing a HR monitor watch or chest strap.
I start off with an easy warmup for a mile or two at 1% grade. Then I increase the speed to about 5k pace or a little faster. The speed stays at this level for the rest of the test. Then every minute I increase the incline by 1%. I keep going until I can’t keep up with the pace. I then drop the incline back to 1% and slow the speed down to what feels manageable and try to run at least 1 more minute.
My HR monitor will show my HR max and it is usually just after dropping the incline back to 1%. I will be turning 60 in April and I can get my HR up to 186. The 220 - age formula would put my max at 160. I base all my training paces off of the 185 HR and it fits quite well. My regular training runs are at medium/easy effort and my HR falls in the 130 - 140 range, which is between 70% and 75% of my max HR.