Of course, you must take it after exercise. The body needs glycogen supplement and is extremely sensitive to insulin half an hour after exercise. At the same time, intake of glucose and protein can greatly improve the supplementary efficiency of protein. The specific principle can be searched for "metabolic time window".
To sum up, if you have glucose powder, you must supplement protein powder after exercise. As for before and during exercise, it can be supplemented appropriately, but it is not necessary, because there are other substitutes.