I have oak leaf hydrangea that I planted two years ago, the first year they bloomed but did not last year or this year. Do I need to prune them and when is the best time?
No, you don't have to prune oaklef unless you need to do so to restrict size or to remove dead wood.
They bloom on previous year growth, therefore (if needed) pruning should be done right after the bloom.
It's not abnormal for them to be a bloomless for the couple of years after planting. Be patient.
Since you are on a border of 5/6 winter cold or late spring freezes could damage the flower buds and it will skip the year. Kind of lottery, but nothing you could do about unless you want to winterprotect it.