For the easy solution, in iDVD, you have to go to the Project Info Window (Project|Project Info...
menu) and select a Double-Layer disc in the DVD Type
combobox.
A single layer disc is 4,2GB and an untouched 5GB movie file will obviously not fit on it.
If you don't have a double-layer capable burner, you will have to first reduce the quality of the video to reduce its size (through the widely used (and easy to use) Handbrake for example), putting the target size to circa 4GB. You will then be able to burn your file with iDVD or any other DVD authoring tool.
iDVD control of video file compression is too simple.
In iMovie, in Share|Export
You have several size options. Putting the mouse pointer on the little information symbol at the end of each line will give you the approximative size of the output file. I don't know if there is a finer control of output. I usually do it via Handbrake, as stated above.
I would look into using Handbrake, the iLife suite is good for some things, but not this scenario - it will let you create and edit films that are already in a decent file format, or burn them to a DVD, but not take from a DVD with ease (or at all).
While it is possible to snip a portion of a DVD, it's not desirable for a number of reasons, mainly file size. A DVD is encoded in Mpeg2. Good for DVDs, or it was when it was when DVDs were new, but woefully poor compared to a modern codec like H.264. A 3-hour film might take up 8Gb of space on a dual layer DVD, but perhaps as little as 1Gb in a more modern format. Certainly, if the intended recipient is YouTube, then reducing the quality and resolution can easily also reduce file size 20x +, which makes for quicker uploads.
So, considering that, what you will end up doing, regardless of what program you use, is decoding the Mpeg 2 and re-encoding it into something else rather than snipping out (Could be h.264, DivX or any number of others, all of which provide the same quality or better (You can't improve a bad source) at massively lower file sizes). h.264 is a good choice, YouTube use it directly for delivery to mobile devices.
Handbrake lets you choose by DVD chapter, DVD Chapter Episode, or just a section of seconds and quickly re-encode it into something more modern and more suitable for computing use rather than brown box DVD player use. It will do loads of other things, including messing around with subtitles and multiple audio channels (think directors commentary) which your wedding video is unlikely to have, but it's nice to have the ability if you need it for something else later.
Handbrake is free, works on Windows/Mac/Linux, and is actively developed & updated, so a popular choice.
Best Answer
Burn should still work.
There's also the old Apple iDVD & though I haven't tested burning anything with it, it still appears to work on Mojave.
It appears to also still be available from Apple - https://support.apple.com/downloads/iDVD
Macworld did an article on it a few years ago & came to similar conclusions - How to burn movies to disc in an iDVD-less world
They also mentioned Roxio Toast (now up to v17) as a paid alternative
BTW, I can't properly test any of this, as I have no DVD drive except in the Mac. I have to rip bought DVDs to even be able to watch them on the TV ;)