Electronic Number Lock - Digital Electronic Systems
I'm not going to give you a full circuit here, since we don't do that for someone doing homework problems.  But hopefully I will give you enough clues to get started.

I am going to assume you meant a 4-digit input sequence as I asked in my comment.

I also assume you need to design this using discrete logic, and not use a microcontroller, since the latter would make the project rather trivial.

As already mentioned in a comment, you will need to build a state machine (SM) to keep track of where you are in the digit input process (i.e. state 0 is initial, state 1 is one correct digit entered, state 2 is two correct digits entered etc.  The SM can be build using a counter such as the 74HCT4017.

I suggest you encode the output of the four switches into BCD (binary coded decimal) using a chip like the 74HCT147.  Then using a 4-bit comparator such as the 74HCT85, you can compare the switch pressed with a preset code, and if equal, advance the SM to the next state.

When the SM reaches state 4 (all four digits matched), then operate the locking actuator.  The code can be either hardwired, or set using DIP switches for each digit like this one.

If during the entering of digits, an incorrect digit is entered, then you will want to reset the SM to state 0.  You might also want to include a Clear button the does the same thing.  Depending on security, you may also want to include an LED to indicate the SM is in state 0 and ready to accept the first digit.