You can't make a 401k contribution now for your 2018 tax return, before the April 15th filing deadline, that would be based on the Form W-2 income from last year.
401k elective
deferrals must be made through payroll deduction by the end of the
tax year. There's no grace period after that to make additional
contributions.