By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table `student_account` (
student_id int);
create table `student`(
student_id int primary key
);
ALTER TABLE `student_account`
ADD INDEX `student_id_idx` (`student_id` ASC) VISIBLE;
ALTER TABLE `student_account`
ADD CONSTRAINT `student_id`
FOREIGN KEY (`student_id`)
REFERENCES `student` (`student_id`)
ON DELETE RESTRICT
ON UPDATE CASCADE;