"How to get smart again" is a pretty big question to find a solution for, haha.
Imo, you gotta find the root(s) of your problems first before you try to improve anything. Why are you unable to learn these things as quickly as before? Is it procrastination, no motivation, you genuinely just don't understand it, etc. Mental health problems are usually the biggest factor in why gifted kids tend to burnout, but that may or may not he the case for you, which is why I suggested finding the cause(s) of your problems first :P Personally, my "downfall" of gifted kid status was primarily due to my mental health
While working on the source of your problems takes quite a bit of time, you could try to discipline yourself through finding ways to force yourself to study or something. Though, this is only if you're having trouble with studying itself and/or not understanding your school work. I've heard that some gifted kids never really taught themselves how to study (properly) due to them easily passing assignments without having the need to, so if that's your case, I'd suggest study groups w/ friends (or just other people in general) and/or staying after-school. Really, you just need to put yourself in a setting where you're less inclined to slack off. If you truly believe in yourself, you could do the typical flashcards, taking notes, rereading notes, etc. at home (and set a timer or something) by yourself, but obviously you might be more likely to procrastinate by doing that :0
Idk the specifics of your problem so all this advice is based on what other people have experienced, but something here should give you a starting point on what to do