The operating range of the Ryzen 5 3600 is 3.6GHz to 4.2GHz. Typically only single thread processes will get anywhere near max boost frequency, whereas multi core workloads will get less. If the processor is hitting up to 4.0 in CPU intensive games it is working normal.
Post a screenshot of Ryzen Master showing power limits and core frequencies while running an all-core load such as Cinebench Multicore.
Ryzen R7 5700X | B550 Gaming X | 2x16GB G.Skill 3600 | Radeon RX 7900XT
Ryzen R7 5700G | B550 Gaming X | 2x8GB G.Skill 4000 | Radeon Vega 8 IGP
Ryzen R5 5600 | B550 Gaming Edge | 4x8GB G.Skill 3600 | Radeon RX 6800XT