Hi there!
The JuMP documentation has a bunch of tutorials and manual content on nonlinear programming with JuMP.
If you’re coming from MATLAB, things are a little different. You should try to write out your objective and constraints as scalar expressions, rather than providing a single large function to optimize.
If you can’t write our your expressions algebraically and you just have a black-box function, JuMP might not be the right tool for the job; see Should I use JuMP? · JuMP.
It’s often hard to provide general advice without seeing code, so I suggest you read Please read: make it easier to help you and provide a simplified minimal reproducible example of the problem that you are trying to solve.