How to. Motivate my partner

Hi everyone, my boyfriend wants a baby and to be honest so do I but the problem is we rarely have sex so after 4 months of trying nothing has happened. How can I change things?