How do I add a fragmented line like this

Hello guys
I am currently writing my dissertation, and I want to know how can I add a line like that
image description

You can add a bottom border in the paragraph style. In case it is the header, you can use the bottom border of the header area as well.

From a typographical view, I would be very cautious in using underlining, especially dashed lines. They are means for typewriters, but not for book layout.